想要A主机登入B主机时不输入密码就可以登入, 目前用了Key的方式来达成,
但设定完后还是会要我输入password, 流程如下:
1.A主机设定
(1) ssh-keygen -t rsa -f test
(2) ssh-copy-id -i ~/.ssh/test.pub root@xxx.xxx.xxx.xxx
(3) scp ~/.ssh/test.pub root@xxx.xxx.xxx.xxx:/root/.ssh
2.B主机设定
(1) vi /etc/ssh/sshd_config
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys
/etc/init.d/sshd restart
(2) chmod 644 ~/.ssh/authorized_keys && chmod 711 ~/.ssh/
设定完成后到A主机 ssh root@xxx.xxx.xxx.xxx
还是会跳出root@xxx.xxx.xxx.xxx's password:
请问是什么设定有问题吗?
17:47:35 xx sshd[29829]: reverse mapping checking getaddrinfo for xxx-xxx-xxx-xxx.hinet-ip.hinet.net [xxx.xxx.xxx.xxx] failed - POSSIBLE BREAK-IN ATTEMPT!