User login

Linux

Set login name to use for SSH per host

As a completely hypothetical example, suppose you boneheadly thought it would be nice to standardize your local login name to something different than on some existing servers.

You want standard scripts that assume current username to work— you wrote them to share, after all. So how to make this work?

Something like this in your ~/.ssh/config file (create and chmod 600 if it doesn't exist already) will work:

Host agaric-test
Hostname test.example.org
User bmelanco

Syndicate content