通过两台Linux主机配置ssh实现互相免密登录
主机1:
1.生成非对称密钥:
[root@client ~]# ssh-keygen -t rsa
2.把主机1文件.ssh/id_rsa.pub发送到主机2的~/.ssh/authorized_keys:
[root@client ~]# ssh-copy-id 192.168.10.131
3.验证发起ssh连接不要任何验证:
[root@client ~]# ssh 192.168.10.131
主机2:
1.生成非对称密钥:
[root@client ~]# ssh-keygen -t rsa
2.把主机2文件.ssh/id_rsa.pub发送到主机1的~/.ssh/authorized_keys:
[root@client ~]# ssh-copy-id 192.168.1.128
3.验证发起ssh连接不要任何验证:
[root@client ~]# ssh 192.168.1.128