SSH Key Management
20. May 2014

As it is with passwords, one may also have multiple ssh keys on multiple pc’s. I use subdirs in the ssh folder to maintain multiple ssh keys. The following example examines this for my github ssh key.

Create a new key:

sandbox myuser$ ssh-keygen -t rsa -C "Github - <my-mail-address>"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/myuser/.ssh/id_rsa): /home/myuser/.ssh/github/id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/myuser/.ssh/github/id_rsa.
Your public key has been saved in /home/myuser/.ssh/github/
The key fingerprint is:
The key's randomart image is:

Configure SSH daemon to automatically use the created key for access:

        User git
        PreferredAuthentications publickey
        IdentityFile ~/.ssh/github/id_rsa

Test github access:

ssh -T [email protected]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.