OpenSSH免密登录设置
目的:一台centos服务器 可以免密登录其余2台服务器
备材料:三台centos虚拟机
同网 同网段 同型号系统
IP地址为 :192.168.217.12
192.168.217.11
192.168.217.13
生成公私钥服务器为192.168.217.12
[root@localhost ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:jDYIWF6C8iNZg+goCO9PtY8vDtK8nu+CaJJmUHSCrnQ root@localhost
The key's randomart image is:
+---[RSA 2048]----+
|.+o . |
|B+=o.