Bug 1323 - ssh-add: add an option to disable passphrase querying (batch mode)
Summary: ssh-add: add an option to disable passphrase querying (batch mode)
Status: NEW
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh-add (show other bugs)
Version: 4.6p1
Hardware: Other Other
: P2 enhancement
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-19 18:51 AEST by Vincent Lefevre
Modified: 2014-07-07 19:08 AEST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vincent Lefevre 2007-06-19 18:51:22 AEST
The ssh command has a BatchMode option to disable passphrase/password querying, but not ssh-add. Such an option would be useful so that identities without a passphrase could still be added without blocking a script (that is attached to a terminal for some reason).
Comment 1 Damien Miller 2014-07-07 18:09:56 AEST
ssh-add < /dev/null ?
Comment 2 Vincent Lefevre 2014-07-07 19:08:48 AEST
(In reply to Damien Miller from comment #1)
> ssh-add < /dev/null ?

The "< /dev/null" has no effect when $DISPLAY is NOT set:

$ env -u DISPLAY ssh-add < /dev/null
Enter passphrase for /home/vinc17/.ssh/id_rsa:

while it avoids that when DISPLAY is set:

$ ssh-add < /dev/null
ssh_askpass: exec(/usr/bin/ssh-askpass): No such file or directory

BTW, I don't know why I get such an error instead of a silent failure (note that $SSH_ASKPASS is not set). "ssh_askpass" is not documented in the ssh-add man page.

My machine is under Debian/unstable, with OpenSSH_6.6.1p1.