一:生成密钥对
[root@localhost ~]# ssh-keygen -t RSA -b 4096
[root@localhost ~]# ll /root/.ssh
二;将公钥发送给要连接的服务器主机上去,这里我选择192.168.136.131为服务器主机
[root@localhost ~]# ssh-copy-id -i 192.168.136.131
三:测试是否能免密远程登陆
[root@localhost ~]# ssh 192.168.136.131
一:生成密钥对
[root@localhost ~]# ssh-keygen -t RSA -b 4096
[root@localhost ~]# ll /root/.ssh
二;将公钥发送给要连接的服务器主机上去,这里我选择192.168.136.131为服务器主机
[root@localhost ~]# ssh-copy-id -i 192.168.136.131
三:测试是否能免密远程登陆
[root@localhost ~]# ssh 192.168.136.131