在Linux中设置SSH无密码登录。 SSH用于远程登录到Linux远程服务器。在Linux中使用RSA / DSA SSH密钥设置SSH无密码登录
# ssh-keygen -t rsa上面的命令将在 ~/.ssh目录两个文件如下。
# ssh-copy-id -i ~/.ssh/id_rsa.pub 192.168.1.103示例输出:
21 root@192.168.1.103's password: Now try logging into the machine, with "ssh '192.168.1.103'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting.它会提示输入远程系统的密码。输入远程计算机的密码,然后按Enter。
# ssh root@192.168.1.103上面的命令不会提示输入密码登录。如果在ssh命令任何情况下有密码提示,这意味着你的设置不正确配置,并再次尝试重新所有步骤。 感谢您阅读这篇文章,我希望它会帮助你。
关注云架构公众号
Linux入门
QQ交流群:308781113