In essence, you create a "config" file in .ssh and tell SSH what private key to use based on the name of the host you are SSHing to. You can also specify user and port. I also found you can specify multiple hosts as "Host abc or xyz"
~/.ssh/config
I added aliases to my /etc/hosts file so I could differentiate between SSH running on mulitple ports at the same server (VM Server). Now I can SSH by the alias name from the hosts file and I don't have to specify the port number or user.
No comments:
Post a Comment