FreeKB - Linux Commands ssh-copy-id
Linux Commands - ssh-copy-id

The ssh-copy-id command can be used to append your public certificate, such as on server "a" to the authorized_keys file on server "b".

In this example, John Doe's public certificate on will be appended to /home/john.doe/.ssh/authorized_keys on ~]# ssh-copy-id /home/john.doe/.ssh/


If the public certificate is successfully appended to the authorized_keys file on the target system, the following should be displayed.

/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ""
/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

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh ''"
and check to make sure that only the key(s) you wanted were added.


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

Please enter 4c5d2 in the box below so that we can be sure you are a human.


Web design by yours truely - me, myself, and I   |   |