Ssh_config

Distributing SSH keys: using ssh-copy-id, manually or automated

Learn how to get your SSH keys easier to another system using different available methods such as manually or a tool like ssh-copy-id

Summary

When you want to allow public key authentication, you have to first create a SSH keypair. Next step is then the distribution of the public key to the other systems. Let’s have a look at a few options, including using the ssh-copy-id utility.

Option 1: Manually

In the past, you had to log in manually to the new system and do things yourself. Especially if you created your key with a tool like PuTTYgen on Windows. Then you logged in on the other system and created a .ssh directory and the related authorized_keys file. Of course, it was common to forget setting the right permissions, resulting in the authentication failing.