Software Knowledge

  1. Home
  2. Docs
  3. Software Knowledge
  4. LINUX
  5. Linux: The easy way to copy key between servers (ssh-keygen)
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

Linux: The easy way to copy key between servers (ssh-keygen)

[root@orabbl2 ~]# 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:

61:2a:36:3e:47:f9:41:88:87:3d:5c:8e:0b:22:3a:d9 root@orabbl2

The key’s randomart image is:

+–[ RSA 2048]—-+

|        .        |

|     = =         |

|. . + B =        |

|.+ . o B .       |

|+ E + = S        |

| . o + . .       |

|    o . .        |

|     o           |

|                 |

+—————–+

[root@orabbl2 ~]#

[root@orabbl2 ~]#

[root@orabbl2 ~]#

[root@orabbl2 ~]#

[root@orabbl2 ~]#

[root@orabbl2 ~]#

[root@orabbl2 ~]# cd

[root@orabbl2 ~]#

[root@orabbl2 ~]#

[root@orabbl2 ~]# ssh-copy-id orabbl

The authenticity of host ‘orabbl (172.16.25.13)’ can’t be established.

ECDSA key fingerprint is cf:79:a9:2c:5a:33:fe:8d:0e:74:a1:9a:dc:1f:24:5a.

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

root@orabbl’s password:

Number of key(s) added: 1

Now try logging into the machine, with:   “ssh ‘orabbl'”

and check to make sure that only the key(s) you wanted were added.

[root@orabbl2 ~]#Last Updated on Tuesday, 23 May 2017 22:49