想要A主機登入B主機時不輸入密碼就可以登入, 目前用了Key的方式來達成,
但設定完後還是會要我輸入password, 流程如下:
1.A主機設定
(1) ssh-keygen -t rsa -f test
(2) ssh-copy-id -i ~/.ssh/test.pub [email protected]
(3) scp ~/.ssh/test.pub [email protected]:/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 [email protected]
還是會跳出[email protected]'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!
--
All Comments