Best way to use multiple SSH private keys on one client [closed]

From my .ssh/config: Host myshortname realname.example.com HostName realname.example.com IdentityFile ~/.ssh/realname_rsa # private key for realname User remoteusername Host myother realname2.example.org HostName realname2.example.org IdentityFile ~/.ssh/realname2_rsa # different private key for realname2 User remoteusername Then you can use the following to connect: ssh myshortname ssh myother And so on.

How to convert SSH keypairs generated using PuTTYgen (Windows) into key-pairs used by ssh-agent and Keychain (Linux)

puttygen supports exporting your private key to an OpenSSH compatible format. You can then use OpenSSH tools to recreate the public key. Open PuttyGen Click Load Load your private key Go to Conversions->Export OpenSSH and export your private key Copy your private key to ~/.ssh/id_dsa (or id_rsa). Create the RFC 4716 version of the public … Read more

Multiple GitHub Accounts & SSH Config

Andy Lester’s response is accurate but I found an important extra step I needed to make to get this to work. In trying to get two profiles set up, one for personal and one for work, my ~/.ssh/config was roughly as follows: Host me.github.com HostName github.com PreferredAuthentications publickey IdentityFile ~/.ssh/me_rsa Host work.github.com HostName github.com PreferredAuthentications … Read more