SSH configuration questions

Matthew Hawkins matt at
Sun Aug 4 23:10:56 EST 2002

Brad Hards (bhards at wrote:
> All seems to be working well, except for getting ssh-add to
> run automatically. I use KDE, and I can make it work by running
> xterm -e ssh-add from .xsessions.
> But that isn't very cool (because I get this xterm between logging
> in and my session-proper starting).

Why run it in the xterm at all?

--- BEGIN QUOTE ssh-add(1) ---
             If ssh-add needs a passphrase, it will read the passphrase from
             the current terminal if it was run from a terminal.  If ssh-add
             does not have a terminal associated with it but DISPLAY and
             SSH_ASKPASS are set, it will execute the program specified by
             SSH_ASKPASS and open an X11 window to read the passphrase.  This
             is particularly useful when calling ssh-add from a .Xsession or
             related script.  (Note that on some machines it may be necessary
             to redirect the input from /dev/null to make this work.)
--- END QUOTE ---

I haven't come across any fairly recent Linux distribution that doesn't
automatically do this in the system-wide Xsession anyway (and OpenBSD
does it too, I used to port their X11 scripts to FreeBSD to get the same
functionality).  Ooh, mind you, that was with xdm not kdm.  But still,
the concept is the same.

"So, logically, if she weighs the same as a duck, she's made of wood, and therefore a witch!"
(Monty Python and the Holy Grail)

More information about the linux mailing list