New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh client on Windows7 fails with: ssh_askpass: fork: No such file or directory #966

Closed
christian-korneck opened this Issue Nov 26, 2017 · 8 comments

Comments

Projects
None yet
6 participants
@christian-korneck
Copy link

christian-korneck commented Nov 26, 2017

Please answer the following

"OpenSSH for Windows" version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
tested with versions 0.0.23.0 and 0.0.18.0

Server OperatingSystem
((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName)
any server on any OS - it's a client issue (tested against various servers, both Linux and sshd on localhost running on Win7 SP1 Ultimate)

Client OperatingSystem
Windows 7 SP1 Ultimate

What is failing
On Windows 7, I can't connect to any ssh server using the ssh.exe client from this project. The servers that I've tested all have password auth. The key error message is: ssh_askpass: fork: No such file or directory.

On Windows 10 (tested with Win10-1709) and on Windows 8.1, the same ssh.exe binary works as expected (connections against the same servers).
On the Windows 7 host, the same connections work using a different ssh client (i.e. putty).
Same effect both with the 32bit and 64 bit ssh.exe.

I have tried ssh.exe both in version 0.0.23.0 and 0.0.18.0 (the version that ships as capability/optional feature in Win10-1709) without success.

Expected output

> ssh.exe myusername@tty.sdf.org
myusername@tty.sdf.org's password:
NetBSD 7.1 (GENERIC.201703111743Z)

     *    . @%@%@%@%@%@%@ (    )
     (      {   happy   }  \  (   *
      ) *   { birthday! }   )    (
     (    @%@%@%@%@%@%@%@%@       ) '
   +      {    SDF 30!    }  *   (
          {  1987 - 2017  }    .    )
    jgs   {    June 16    }        (
  *      @%@%@%@%@%@%@%@%@%@    +

Actual output

> ssh.exe myusername@tty.sdf.org
key_load_public: invalid format
ssh_askpass: fork: No such file or directory
Host key verification failed.
PS C:\Windows\System32\WindowsPowerShell\v1.0>

@christian-korneck christian-korneck changed the title ssh client on Windows7 fails with `ssh_askpass: fork: No such file or directory` ssh client on Windows7 fails with: ssh_askpass: fork: No such file or directory Nov 26, 2017

@christian-korneck

This comment has been minimized.

Copy link

christian-korneck commented Nov 26, 2017

ok, I think I figured it out. On my Windows 7 machine the environment variable DISPLAY=localhost:0.0 was set. Removing/Renaming this variable resolved the issue.

While it was set, my c:\Program Files\OpenSSH\ssh.exe was trying to execute c:\Program Files\OpenSSH\usr\X11R6\bin\ssh-askpass.exe, which doesn't exist (seen with a procmon trace).

@manojampalam

This comment has been minimized.

Copy link
Collaborator

manojampalam commented Nov 28, 2017

Thanks for following up.

@pavelkomarov

This comment has been minimized.

Copy link

pavelkomarov commented Nov 29, 2018

Why does it matter that the DISPLAY environment variable is set? That shouldn't lead to something asking for a password any differently than it would otherwise!

I am experiencing the same trouble with X11 forwarding described here, but I can't leverage their solution of setting the DISPLAY on the client side, because OpenSSH then throws these complaints about permissions being strangely denied.

@christian-korneck

This comment has been minimized.

Copy link

christian-korneck commented Nov 29, 2018

I agree with @pavelkomarov . It looks like a bug to me. Any chance that this issue could get re-opened?

@Error-101

This comment has been minimized.

Copy link

Error-101 commented Dec 6, 2018

I agree with @pavelkomarov as well. Why should the display variable matter?

@lonelykid

This comment has been minimized.

Copy link

lonelykid commented Dec 6, 2018

Why does it matter that the DISPLAY environment variable is set? That shouldn't lead to something asking for a password any differently than it would otherwise!

I am experiencing the same trouble with X11 forwarding described here, but I can't leverage their solution of setting the DISPLAY on the client side, because OpenSSH then throws these complaints about permissions being strangely denied.

Wish you found a solution.
The posix_spawn related error seems related to cmd, when I use powershell, the error is gone. but x forwarding still doesn't work.

@forester-guo-gmail-com

This comment has been minimized.

Copy link

forester-guo-gmail-com commented Jan 17, 2019

@christian-korneck 's solution worked.
In my Windows 10 cmd terminal, DISPLAY=:0.0, scp failed with: "
CreateProcessW failed error:2
ssh_askpass: posix_spawn: No such file or directory
Host key verification failed.
lost connection"
I removed the env variable by "set DISPLAY=". Then scp copied files successfully.

@pavelkomarov

This comment has been minimized.

Copy link

pavelkomarov commented Jan 17, 2019

Yeah, but it's a work-around. The bug remains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment