ssh无密钥登陆的简单配置

主要目的是把本地的公钥放到远端被登陆的host上。

本地操作:

# ssh-keygen
# ssh-copy-id user@host

远端sshd_config配置:

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

加速登陆速度的配置(远端):

UsePAM yes
UseDNS no
重启远端sshd服务:
systemctl restart sshd

done!