http://callmepeanut.blog.51cto.com/7756998/1336358
vim ~/.
ssh
/authorized_keys
cat /home/id_rsa_2048.pub>authorized_keys
1
|
chmod
400 ~/.
ssh
/authorized_keys
|
安全起见,设置不能密码登陆
基于密钥认证的配置
#
PasswordAuthentication no //禁止使用基于口令认证的方式登陆
PubkeyAuthentication yes //允许使用基于密钥认证的方式登陆
#/etc/init.d/sshd reload