Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Is there a ssh key management tool, for the Linux command line, that makes a key available to various windows after one entry of the key's passphrase? I'm thinking of something similar to Putty's pageant, which requires the passphrase to load the key but then supplies the key to Putty whenever needed for a connection.

In Linux I use command lines in terminal windows, and even with agents each window seems to require a passphrase entry. If I want more than one window into a remote host I have to repeat the passphrase for each window.

I suppose I've overlooked some obvious functionality of ssh or the agents, but so far I can't find a way to do this.

share|improve this question
up vote 6 down vote accepted

In Linux I use command lines in terminal windows, and even with agents each window seems to require a passphrase entry.

The standard practice here is to start the ssh-agent before X11 or as part of your session, so the agent will be available to anything your run. The exact method you would use to this depend on how you start X11.


share|improve this answer
Thanks. I'll have a look. With your hint I already figured out I should launch new windows with "xterm&" from a window with a loaded ssh-agent. That provides a new window with the same agent, and puts its process (?) in background so the initial window is available for work or more window launching. Thanks. – chernevik Jul 2 '09 at 20:44
pageant is basically the putty ssh-agent. PuTTY + agent == pageant apparently. – jldugger Jul 3 '09 at 4:20

I'm using keychain for this:

# SSH Agent for host bart
if [ -f ~/.ssh/id_dsa-bart ]; then
  keychain -q ~/.ssh/id_dsa-bart
  source ~/.keychain/${HOSTNAME}-sh

First time I open an terminal, ssh-askpass-gnome comes up and is asking the password. Then this password is held the whole X session.

share|improve this answer
+1 for keychain. I use it. – David Pashley Jul 2 '09 at 22:29
Is this snippet going into a .bashrc file, or some similar startup script? – chernevik Jul 3 '09 at 11:24
right, in your .bashrc - I forgot to mention – ThorstenS Jul 3 '09 at 13:05

I've read very recently something similar, but using a functionality of the terminal, not ssh, here it is : urxvt + pwsafe

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.