The short question is that I'd like to know if it is possible to give ssh connections 'friendly' names in terminal?
My long reasoning is…
I've got several server clusters running behind a single IP address via NAT. I can SSH into the individual servers in each cluster with different port numbers e.g:
ssh clust1 -p 2210
ssh clust1 -p 2220
ssh clust1 -p 2230
In Putty/Windows I would give each connection a different name (clust1-web1, clust1-web2, clust1-web3), but in Terminal I cannot see a way to do this. This poses a problem because I cannot differentiate the server I'm connecting to by hostname, and the port numbers are somewhat random.
Best Answer
Run this from the terminal:
and then you can insert your hosts like so:
Then you can ssh by simply running:
For a full list of arguments you can place in this file you can run: