sed -i ‘s/PermitRootLogin.*/PermitRootLogin yes/‘ /etc/ssh/sshd_config
sed -i ‘s/PasswordAuthentication.*/PasswordAuthentication yes/‘ /etc/ssh/sshd_config
service sshd restart
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
ssh-keygen -A
原文:https://www.cnblogs.com/erdanyang/p/10892891.html