Skip directly to content

How to login on SSH without password

on Sat, 2009-01-17 12:36

This mini-HOWTO explains how to login with OpenSSH without password.

To login on a remote server without being prompted for password, you need to store your public key on the server. If you don’t already have a public key, you need to generate a public/private key pair. To do that, just run following command:

ssh-keygen

This will prompt you for a location to save the keys, and a pass-phrase. Just accept te defaul values, i.e. ~/.ssh/id_rsa and empty pass-phrase.

When you have a public key, it is just a matter of running following command to copy the public key to te server:

ssh-copy-id user@machine

where user and machine should be replaced with your username on the remote server and the host name of the remote server, respectively.

You should now be able to login on the remote server without being promoted for the password, e.g.

ssh user@machine uptime
Tags: 

Post new comment