Skip to content

Easy password-less SSH login

1. Generate your SSH key. Leave passphrase empty (simply press enter):

ssh-keygen

2. Copy the key to the server where you want to login without using password authentication:

ssh-copy-id user@host.name.com

2 Comments

  1. Or install seahorse-plugins, when it asks for the password for the first time click details and tick to unlock when you login.

    Saturday, June 5, 2010 at 3:00 am | Permalink
  2. jimcooncat wrote:

    If you have multiple users, or if there’s ever the possibility of multiple users on your computer in the future, you need to ensure that this file is not readable by them.

    It appears that ssh-keygen does the right thing, allowing only the owner of the file access to it.

    ls -al .ssh/
    will let you verify it. You should see something like:
    -rwx—— 1 you you 736 2007-05-15 11:26 id_dsa
    or
    -rwx—— 1 you you 736 2007-05-15 11:26 id_rsa

    Where some people get in trouble with sensitive files is with backup schemes. That is, the backups don’t enforce the permissions and others can get access to the file.

    Sunday, June 6, 2010 at 2:34 pm | Permalink

Post a Comment

Your email is never published nor shared.
*