You can try this
1) Create public key like this
ssh-keygen -t rsa
It will ask u a passphrase, do not give any, just enter
2) 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
scp $HOME/.ssh/id_rsa.pub usuario@server.remoto:/home/user/.ssh/authorized_keys2
or
ssh-copy-id ~/.ssh/id_rsa.pub username@example.com
# Now you can connect to the remote server with out being asked for a password.
3) ssh -l usuario server.remoto
No comments:
Post a Comment