How to login in a remote server using SSH and no password rsa keyFollow @ggarron
If you would like to connect to your machine through ssh without being asked for a password you should do this.
- Create a public/private key pair
- Copy te file id_rsa.pub to the $HOME/.ssh directory of the machine you wish to connect to, where $HOME is the directory of the user you would like to connect as. /root/.ssh in the case you would like to connect as root. Consider you would like to connect as the user user
- Now you can connect to the remote server with out being asked for a password.
ssh-keygen -t rsaPlease Do not forget not to write any passphrase, just empty for no passphrase for this to work
scp $HOME/.ssh/id_rsa.pub firstname.lastname@example.org:/home/user/.ssh/authorized_keys2or
ssh-copy-id -i ~/.ssh/id_rsa.pub email@example.com
ssh -l usuario server.remoto