Wednesday, January 19, 2011

SSH without passwords

If you need quick access from your home to the VPS there is an easy solution that won't require a password to login. First, create a private and public ssh key pair on your desktop:
ssh-keygen -t rsa
Copy the public key to the vps (replace vps by the hostname or IP address):
ssh-copy-id -i .ssh/id_rsa.pub vps

Login to the VPS from the desktop:
ssh vps

And you should be able to login without a password. Enjoy!