Bug 1342 - SSH_ASKPASS not working as expected
Summary: SSH_ASKPASS not working as expected
Status: CLOSED WORKSFORME
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 4.6p1
Hardware: All Cygwin on NT/2k/Win7-11
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-20 22:58 AEST by Jan Alphenaar
Modified: 2016-08-02 10:41 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 Jan Alphenaar 2007-07-20 22:58:03 AEST
I have set up SSH with the SSH_ASKPASS and DISPLAY variable set. Everything works perfectly. When ssh is used without a tty, the askpass program is executed, providing the password.

But when I change the location of the askpass program, so it contains a space in the absolute path name (for example "c:\My Documents\askpass") the askpass program cannot be found. I get a "c:\My is not recognized as an internal or external command, operable program or batch file" error message back.

This indicates that openssh executes the askpass program with an absolute path, without decently quoting the string (surrounding it with "" characters). I am using the cygwin implementation of openssh, currently version 4.6p1. But I expect this bug to appear in all operating systems, supporting a space in file and directory names.
Comment 1 Damien Miller 2008-06-12 17:54:20 AEST
How are you specifying SSH_ASKPASS? Testing with

env SSH_ASKPASS=/home/djm/bin/ssh\ askpass ssh-add </dev/null

works for me as expected.
Comment 2 Darren Tucker 2012-09-12 15:04:25 AEST
ssh-askpass is invoked (in readpass.c) via execl(2) which has no quoting requirements, as Damien's example showed.  With no further info there's nothing we can do.
Comment 3 Damien Miller 2016-08-02 10:41:48 AEST
Close all resolved bugs after 7.3p1 release