一、配置
chmod 755 ~/.ssh
ssh-keygen -t rsa
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
vi /etc/ssh/sshd_config PubkeyAuthentication yes # 启⽤公钥私钥配对认证⽅式,ssh-copy-id需要此权限
service sshd restart $ ssh-copy-id -i ~/.ssh/id_rsa.pub root@xxxx