-
Notifications
You must be signed in to change notification settings - Fork 772
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
Comments
ssh_askpass: fork: No such file or directory
ok, I think I figured it out. On my Windows 7 machine the environment variable While it was set, my |
Thanks for following up. |
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. |
I agree with @pavelkomarov . It looks like a bug to me. Any chance that this issue could get re-opened? |
I agree with @pavelkomarov as well. Why should the display variable matter? |
Wish you found a solution. |
@christian-korneck 's solution worked. |
Yeah, but it's a work-around. The bug remains. |
This is an interesting bug. It happens because when DISPLAY is defined and there is no accessible tty (console, terminal, etc), it wants to fallback to requesting password by some external application call. Now, the problem is that the check for an available console is done by opening /dev/tty. This works perfectly well on *nix platforms, but on Windows the corresponding thing should really be to open CON or CONIN$ instead. As a workaround it seems that it is possible to create a directory C:\dev with an empty file called tty, so that the path \dev\tty can be opened. Just tested that and it seems to work. I'll try to build a version with CON instead of /dev/tty for Windows builds and see what happens. |
Yes. At line 457 in define.h, changed:
to
And everything seems to work correctly even with DISPLAY variable set now. It even sets up X11 forwarding correctly as far as I can see (provided XauthLocation is set to a working xauth setup in ssh_config). |
@LTRData So this is now fixed? When it will be available in Windows? |
The workaround of creating CommandType Name Version Source
----------- ---- ------- ------
Application ssh.exe 7.7.2.1 C:\WINDOWS\System32\OpenSSH\ssh.exe This was driving me crazy. |
nice! |
if you are using ssh with a different drive other than C: then you need to add the dev/tty folder to that drive as well. |
See also #1088 (where the same workaround is mentioned). |
on Windows 10, I am able to log in using ssh. But using rsync and ssh was not successful, even with the \dev\tty hack. |
Currently openssh tests for a TTY by opening /dev/tty which does not exist on Windows. It most cases this then falls back to a prompt that works, but if the DISPLAY env var is set, then it tries to spawn "/usr/X11R6/bin/ssh-askpass" and fails - see issue #966, #1515, PowerShell#762, #1088, #1356, and probably others. Possible workarounds are to create a file `C:\dev\tty` so that it is able to open it, or to unset the DISPLAY variable, but it would be better if OpenSSH could detect this is a valid console. Code is from PowerShell/Win32-OpenSSH#966 (comment)
I had this too... create an empty file on the path: |
creating an empty file c:\dev\tty solved the problem for me too. I am using win 10 ver 20H2 and Build 19042.685. |
Please answer the following
"OpenSSH for Windows" version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
tested with versions
0.0.23.0
and0.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 version0.0.23.0
and0.0.18.0
(the version that ships as capability/optional feature in Win10-1709) without success.Expected output
Actual output
The text was updated successfully, but these errors were encountered: