Using SSH alias for a faster connection
You are probably using the following command when you are trying to connect to your server through SSH
ssh -i id_rsa_myserver.pub email@example.com
Which is valid but it takes some time to remember which of your several ssh keys is the indicated one for that specific server. Fortunately, there is a simple way save that time.
- Within your terminal change the path to your .ssh folder
- Create a new file called config using nano config
- Inside that file, type the following structure
Host aliasHostName myserver.comUser rootIdentityFile C:\Users\Demo\.ssh\id_rsa