how to connect to a remote server via ssh without entering a password
this is for openSSH client and server:
- create a key on your client machine:
ssh-keygen -t rsa
ssh-keygen -t dsa
- select location. it's fine to leave it as default
- append the key to the remote server:
cat ~/.ssh/id_rsa.pub | ssh you.server.addr "cat - >> ~/.ssh/authorized_keys"
cat ~/.ssh/id_dsa.pub | ssh your.server.addr "cat - >> ~/.ssh/authorized_keys"
To keep ssh session alive, edit on your machine ~/.ssh/config file to say ServerAliveInterval 180 or some other number. This sends signal to server every 180 sec to prevent being seen as idle.
back to main page