May 05, 2004
ssh address book

If you don't have the same username on every system you use, OpenSSH has a facility for associating usernames with hostnames. It also lets you define aliases for hostnames and IP addresses (e.g. for hosts that don't have DNS entries for whatever reason). Just put something like this in your ~/.ssh/config file.

Host foo
	Hostname foo.some-long-domain.com
	User userone
Host bar
	Hostname 1.2.3.4
	User usertwo

You can also use the User directive outside the Host context to define your default login name on remote systems. Handy if your normal login is different from the one on your workstation (think Administrator).

Sources: OpenBSD-misc mailing list and the OpenSSH ssh_config man page.

Posted by tim at May 05, 2004 09:16 AM
Comments
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?