Quick Tip: SSH Config
It’s easy to create shortcuts for all those servers you need to SSH into. There should be a file in your .ssh directory called config. Simply add a few lines to this file and you can refer to those servers by their short name.
Example (~/.ssh/config)
Host foo
Hostname some.long.hostname.you.cannot.remember.com
User myuser
Port 1234
Now you can use your new host when you SSH.
ssh foo
If you want to get even fancier, read the man page for additional options.
man ssh_config
Setup as many as you need and free yourself from SSH hostname hell!
More of my rantings
These might also interest you
- Startup Tip: One Successful Client. (Aaron Post)
- Here’s a tip (Brainfuel)
- Outlook Tip (Brainfuel)
Wow. I never heard about that until now. Thanks for sharing! It’s going to make using sftp a lot less painful.
August 23rd, 2008 at 5:42 amHmmm. NIce Curtis. I always just create an alias in by .bash_profile, but this seems cleaner.
August 23rd, 2008 at 5:42 am