I routinely SSH into a company machine on Openstack to do work. Until yesterday, I’d use my Bash history to find the SSH command I needed to access it. I was reading SSH Mastery in a plane yesterday and realized I’ve been foolish to neglect the power of ~/ssh/config
.
I added this to my SSH config file:
|
|
Now I can connect to the machine by typing $ ssh lab
. That’s it. I don’t have to provide the SSH key, username, or machine IP.
The RemoteForward
bit also forwards a port to enable me to open files on the remote machine in my local SublimeText editor using rsub. This is great.