Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've set up a passwordless login to a friend's computer and everything works very well.

I've even edited my ~/.ssh/config to add his hostname and my username.

So I just type ssh friend and it connects... but every time I log out (and back in) before running ssh friend, I'm asked for my passphrase.

Is there a way to avoid this? I tried with ssh-add but it also locks on log-out.

share|improve this question
up vote 1 down vote accepted

You can remove the password from your key file, but of course that's not very safe...

share|improve this answer
Hum, yeah i thinks that isn't very secure or recommended but i guess it's my only option, there's anyway to do that for my actual key ? – Diego Garcia Oct 27 '10 at 4:04
I removed my key and created a new one. – Diego Garcia Oct 27 '10 at 4:22

It's really not a good security policy to use passwordless ssh keys. Using pubkey authentication for signing in is a great way to secure the ssh server, but if your private key is ever compromised, your security goes right out the window. My suggestion would be to keep the password on your SSH key, and let SeaHorse automatically unlock the key when you're logged into the computer, or remember it for that specific login session. That way your key is still protected by a password, but you only have to enter the password once per login session.

share|improve this answer

You can SSH login without password if you want to, as nathwill said you should use passphrase for extra security, but there are ways to add more security

  1. disable password login
  2. use allowusers/denyusers
  3. white list iptables
share|improve this answer

Have a look an Keychain. It's available from the Ubuntu repositories. You can set it up to ask for the passphrase only at the first login after the system was rebooted.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.