linux之间ssh 不需要输入密码

linux之间ssh 不需要输入密码
linux之间ssh 不需要输入密码

Linux之间ssh不需要密码登录现在有两台linux

Linux1: https://www.360docs.net/doc/a47082621.html, IP:192.168.20.128

Linux2: https://www.360docs.net/doc/a47082621.html, IP:192.168.20.129

我们要让Linux1能ssh linux2不需要密码。

在linux1上,第一次ssh Linux2 如下:

第二次ssh linux2 :

现在在linux进行如下配置:

1.ssh-keygen -t rsa

-t 指定加密类型

2.ssh-copy-id –i ~/.ssh/id_rsa.pub root@192.168.20.129

root@192.168.20.129就是Linux2

我们现在去linux2看看:

我们去linux1 看看是不是不需要输入密码

不行看看是不是配置文件的问题

再去linux1试试:

成功了 OK!

相关主题
相关文档
最新文档