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 HostName Port 22 User someuser IdentityFile ~/.ssh/id_example IdentitiesOnly yes

Create a password authentication entry

Host anotheralias HostName User anotheruser PubKeyAuthentication no

Use the alias

``` ssh somealias

ssh anotheralias ```

source: Servers for Hackers - SSH Tricks