linux下ssh免密码,使用私钥登录设置方法

第一步
ssh-keygen -t rsacat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keyschmod 700 ~/.sshchmod 600 ~/.ssh/authorized_keys
第二步
修改 /etc/ssh/sshd_config 三处
PubkeyAuthentication yesAuthorizedKeysFile ~/.ssh/authorized_keysPasswordAuthentication no
最后
service sshd reload
