[root@linuxsysad ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): PRESS ENTER KEY FOR BLANK PASSWORD
Enter same passphrase again: PRESS ENTER KEY FOR BLANK PASSWORD
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:l0G3/GrujoduLPWr7a/k7vjNcwhuF2ONI/oalNMtYVk root@linuxsysad
The key’s randomart image is:
+—[RSA 2048]—-+
| . . E |
| . o + |
| . * |
| * + |
| S * o oo |
| o..oo* .|
| o.=++ = |
| . =X=o+ .|
| +*&#=+o |
+—-[SHA256]—–+
[root@linuxsysad ~]# ssh-copy-id user@yourhost
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: “/root/.ssh/id_rsa.pub”
The authenticity of host ‘10.172.6.14 (10.172.6.14)’ can’t be established.
ECDSA key fingerprint is SHA256:j/ssBxT7F9w1jllYZUwYA7jTdK/ZyAY+KypZq1NpARU.
ECDSA key fingerprint is MD5:8f:62:f5:4b:02:e3:51:6f:db:10:d6:0e:52:89:0b:f6.
Are you sure you want to continue connecting (yes/no)? yes
/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
ganesh@10.172.6.14’s password: ENTER PASSWORD