HR Geeks

SSH Tricks

by adam on Oct.14, 2007, under tools

I’ve discovered a neat SSH trick / timesaver. You can create per-user ssh configuration files – ~/.ssh/config – which can contain host aliases.

For example, I SSH to ‘host.long.stupid.domain.com’ a lot. I can shorten this by putting:

Host myserv
HostName host.long.stupid.domain.com
User myDomainUser

into the configuration file. Now, I can do:

user:~>ssh myserv

and ssh will effectively run:

ssh myDomainUser@host.long.stupid.domain.com’

without having to type it all. Combine that with ssh keypairs (~/.ssh/authorized_keys2), and you can save a serious amount of typing!


1 Comment for this entry

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!