April 11th, 2011 – 6 Comments
More fun with SSH! We showed you how to setup SSH config files and use tab completion for SSH aliases, but setting up bash aliases is even easier if you are connecting to the same server over and over again.
Here’s what you’ll need to do:
On a new line, enter something like this:
alias servername=’ssh -p 888 email@example.com’
Hit Control+O to save then Control+X to exit nano, and relaunch the Terminal.
Now you only have to type ‘servername’ and off you go.
A few of our commenters pointed this out as an even easier method to connect to a server than setting up a config file specifically for SSH. Thanks for the input everyone.