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

From my .ssh/config:

Host myshortname
    IdentityFile ~/.ssh/realname_rsa # private key for realname
    User remoteusername

Host myother
    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.

Leave a Comment