Amon Otis Poston
Human Rights Focused Computer Scientist
PGP Fingerprint: 856B 3022 A763 BB23 EA1E DD91 E784 D6D5 7CAB 42A2

Same hostname but different keys or usernames
07/03/23

I recently set up multiple users on a server and wanted to change my ssh config file to allow me to add aliases for both users.

Takeaway: OpenSSH allows you to onto the config file, so copy the ssh credentials, paste them, then change the "Host" parameter to another name.

The resulting config file looks something like this:

filename: ~/.ssh/config

Host root_for_my_server
Hostname domainname.com
IdentityFile ~/.ssh/rsa_1
IdentitiesOnly yes

Host admin_for_my_server
Hostname domainname.com
IdentityFile ~/.ssh/rsa_1
IdentitiesOnly yes