1). 用root用户修改本机sshd的配置文件 vi /etc/ssh/sshd_config 找到以下内容,并去掉注释符”#“ RSAAuthentication yes PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys
2) 重启ssh服务 :
service sshd restart