[root@localhost sec]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/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:ITWiz9fEUqKUOZ4Smccjg+095U7+B43xLw6Z6N/S3CM root@localhost.localdomain
The key's randomart image is:
+---[RSA 2048]----+
| o +oo+ . |
| . BoB+.= |
| ..Bo*o o |
| oo=.o=. |
| .o=S .= |
| .o.ooo |
| ..++ o |
| . ooE + |
| ...+oo . |
+----[SHA256]-----+
[root@localhost sec]# ssh-copy-id 192.168.127.131
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.127.131's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.127.131'"
and check to make sure that only the key(s) you wanted were added.
[root@localhost sec]# ssh-copy-id 192.168.127.132
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.127.132's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.127.132'"
and check to make sure that only the key(s) you wanted were added.
[root@localhost sec]# ssh-copy-id 192.168.127.133
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.127.133's password:
Number of key(s) added: 1
Now try logging into the machine, with: "ssh '192.168.127.133'"
and check to make sure that only the key(s) you wanted were added.
[root@localhost sec]#