ssh-add </dev/null and SSH_ASKPASS
Marius Gedminas
marius at pov.lt
Fri Apr 24 16:19:30 UTC 2009
On Thu, Apr 23, 2009 at 08:58:46AM -0600, Hatem Nassrat wrote:
> piping /dev/null to ssh-add, or running ssh-add not from a TTY causes
> SSH_ASKPASS to be triggered on all OS and Desktops including
> (K)Ubuntu.
>
> Similarly under Ubuntu (Gnome) trying to ssh to a machine will pop-up
> SSH_ASKPASS whether or not a valid TTY is present. This is not the
> case with Kubuntu, how can I make Kubuntu be the same in that
> respect...
Unfortunately I don't know how exactly is Ubuntu's magic is implemented.
I've been using this shell script as a wrapper for ssh for a while:
#!/bin/sh
if [ -n "$SSH_AGENT_PID" ]; then
# See if ssh-agent has any identities, and if not, add some
ssh-add -l > /dev/null || ssh-add
fi
exec /usr/bin/ssh "$@"
If you change it to invoke ssh-add </dev/null and put it somewhere in
$PATH before /usr/bin (~/bin is a good place), it should do what you
want.
Marius Gedminas
--
Windows 98: Not Plug & Play, but Bug & Pay!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20090424/3c142165/attachment.sig>
More information about the Ubuntu-devel-discuss
mailing list