Setup an SSH Config File
If you use SSH even somewhat often, it would benefit you to setup a basic SSH config file. If you’re curious why, would you rather type something like this:
ssh -p 6851 email@example.com
Or just type:
I know what I’d rather do, so let’s get this working. I’m going to use nano editor because it’s user friendly.
Launch the Terminal and type the following:
You’ll probably have a blank config file and that’s fine, so here’s what we’ll add to it:
Here’s how this might look:
I keep things indented to make them easier to read but it’s not necessary. Once your server and login info is inputted, hit Control+O to save the file, then Control+X to quit out of nano.
Now you can just type the shorthand to connect to a server, such as ‘ssh osxd’ and the full hostname, port, and username will be included for you.
There are many more possibilities with SSH configs, if you want to check out more options just look at the manual page with “man ssh_config”
Check out some more command line tips while you’re at it.