Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am on Debian 6.0.3.

My SSH private key would automatically be unlocked earlier because I guess it was configured with Seahorse. It would just ask for my password and handle things on its own.

For some weird reason, it doesn't seem to work anymore. I am sure that I did not change any setting. Now whenever I try to log in to a remote server, it asks me for:

Enter passphrase for key: '$PATH_TO_KEY'

This is annoying! How can I fix it? I know I have to use ssh-agent and I tried to add the key but it just doesn't seem to work.

share|improve this question

migrated from askubuntu.com Dec 7 '11 at 1:23

This question came from our site for Ubuntu users and developers.

    
What happens when you try ssh-add? –  derobert Dec 7 '11 at 4:00
add comment

2 Answers 2

A fix depends on how you manage your ssh keys. From what you've wrote I guess that you are using ssh-agent. If that's true ssh-add -l should give you a list of keys that are currently managed ... or an error if the agent hasn't been started.

ssh-agent is usually started by one of the shell init files or one of the X init files or by pam_ssh. You should find out where you start ssh-agent (if it's started at all) to encircle the problem.

Alternatively, you can use GnuPG as an ssh-agent replacement. When starting the gpg-agent you can add the --enable-ssh-support option. Again, gpg-agent must be started somewhere, preferably upon login.

share|improve this answer
add comment
  1. Execute ssh-agent
  2. Execute ssh-add
  3. Export the two variables SSH_AUTH_SOCK and SSH_AGENT_PID in any terminal session you want to use automatic unlocking of ssh keys.
share|improve this answer
add comment

Your Answer

 
discard

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