I personally have a numerous number of hosts which I sometimes have to SSH to. It can get rather confusing and inefficient if you get lost among them.
I’m going to show you here how you can get your SSHing to be heaps more efficient with just 5 minutes of your time.
In $HOME/.ssh/config I usually store all my hosts in such a way:
You obviously got the idea. So if I’d like to ssh to host2, all I have to do is:
That will ssh to email@example.com:5678 – saves a bit of time.
I usually manage all of my hosts in that file. Makes life simpler, even use git if you feel like it…
I’ve added to my .bashrc the following:
Sweet. All that you have to do now is:
We are a bit more efficient today.