1. 在本地生成公钥,
ssh-keygen -t RSA -b 800
2. cd /root/.ssh
3. ssh-copy-id -i id_rsa.pub 远程服务器IP
这一步需要输入远程服务器的root密码
4. 测试登录远程服务器
搞定 !!