Skip to content

Setup Ssh Aliases

How to Set Up SSH Aliases - SSH Config#

vim ~/.ssh/config

You can have as many entries as you like

Create a public key entry#
Host somealias
    Port 22
    User someuser
    IdentityFile ~/.ssh/id_example
    IdentitiesOnly yes

Create a password authentication entry#

Host anotheralias
    User anotheruser
    PubKeyAuthentication no
Use the alias#
ssh somealias

ssh anotheralias

source: Servers for Hackers - SSH Tricks