编辑这个文件: /etc/ssh/sshd_config
1 2 3 |
# Change to no to disable s/key passwords #ChallengeResponseAuthentication yes ChallengeResponseAuthentication no |
修改为:
1 2 3 |
# Change to no to disable s/key passwords ChallengeResponseAuthentication yes #ChallengeResponseAuthentication no |
然后编辑这个文件 vi /root/.ssh/authorized_keys 将里边的内容删除ssh-rsa前的所有内容