Posts tagged “ssh”

TIL you can use multiple ssh private keys in one client.

April 7, 2022

TIL you can use multiple ssh private keys in one client.

# credit: https://stackoverflow.com/a/2419609
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