### 一、如何做两台主机的免密
源主机Ip | 目标Ip | 备注 |
---|---|---|
192.168.10.11 | 192.168.10.111 | |
172.16.1.11 | 172.16.1.111 |
1.登录主机Ip做免密
[root@test ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
/root/.ssh/id_rsa alreadyexists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key "/root/.ssh/id_rsa" failed: Permission denied
[root@test ~]# lsattr .ssh/
----i----------- .ssh/id_rsa
----i----------- .ssh/id_rsa.pub
[root@test ~]#