I am working with serverals hosts and I do not want specify the password every time that I want to connect to any hosts. Then I have generated a key with:
Enter file in which to save the key (/home/robe/.ssh/id_rsa): my_key Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in my_key. Your public key has been saved in my_key.pub. The key fingerprint is: e6:d9:a3:85:38:b1:b2:a9:4d:3b:c1:33:65:df:57:25 robe@computer The key's randomart image is: +--[ RSA 2048]----+ | | | E .| | o | | o . | | . o..S. . | | = *.+. . | | o++ + +. | | o.= . o . | | ..=. . | +-----------------+
then I copy the my_key.pub to the authorized_keys file in every hosts and I can connect with:
ssh -i /path/to/my_key user@host
But here is my problem, I want to connect without specify the key. I will like to find a way that I run:
Note: I want to keep my default id_rsa and id_rsa.pub keys. The my_key key is an alterntive option to manage other hosts.