How to login in a remote server using SSH and no password rsa key
Follow @ggarronIf 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 rsa
Please Do not forget not to write any passphrase, just empty for no passphrase for this to workscp $HOME/.ssh/id_rsa.pub usuario@server.remoto:/home/user/.ssh/authorized_keys2
orssh-copy-id -i ~/.ssh/id_rsa.pub username@example.com
ssh -l usuario server.remoto