Skip to content
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 "ssh_askpass: posix_spawn: No such file or directory" #1088

Closed
llinyu opened this issue Feb 28, 2018 · 25 comments
Closed
Assignees

Comments

@llinyu
Copy link

llinyu commented Feb 28, 2018

"OpenSSH for Windows" version
tested with versions v1.0.0.0-Beta

Client OperatingSystem
Windows 7 SP1 Professional

What is failing
On Windows 7, I can't connect to any ssh server using the ssh.exe client from this project. but putty works.
I have tried ssh.exe both in version v0.0.24.0 and v1.0.0.0-Beta without success.

I see the following:
#966

but no environment "DISPLAY" variable on my Windows 7
DISPLAY=localhost:0.0

Expected output

ssh.exe [email protected]
[email protected]'s password:

Actual output

ssh.exe [email protected]
key_load_public: invalid format
ssh_askpass: posix_spawn: No such file or directory
Host key verification failed.

@bagajjal
Copy link
Collaborator

@llinyu - Enable more debugs logs, sshd.log (with DEBUG3 enabled), ssh logs (ssh -vvv user@ip).
Please validate what's difference between putty and win32-openssh ssh.exe.

@llinyu
Copy link
Author

llinyu commented Mar 1, 2018

I am terribly sorry. I made a mistake.
My OS has a DISPLAY environment variable I didn’t figure it out, it is the same problem as #966.

@llinyu llinyu closed this as completed Mar 1, 2018
@bagajjal bagajjal self-assigned this Mar 1, 2018
@pavelkomarov
Copy link

pavelkomarov commented Nov 29, 2018

I don't think @llinyu made a mistake. I'm trying to get X forwarding working (long story) with the same setup described here, but it keeps failing with "ssh_askpass: posix_spawn: No such file or directory".

ssh-askpass.exe isn't a thing in your release, and it's unclear to me where ssh_askpass might live. It can be an environment variable, but why should I have to set it and what to? Clearly the code should never try to call something that doesn't exist, or it's looking for it in the wrong place. It's strange, because when my DISPLAY environment variable isn't set ssh asks for my password the normal way, and it's fine. Why shouldn't it always get my password that way? This remains a bug.

@nicksunyang
Copy link

Have you solved it?

@psz2036
Copy link

psz2036 commented Sep 26, 2019

I seem to have found a workaround: create an object \dev\tty (in C:), e.g. with
mkdir \dev
echo x > \dev\tty
then Win10 ssh will prompt for password "normally".
With Xming I also seem to need "set DISPLAY=localhost:0" and to use "ssh -Y".

@cwg999
Copy link

cwg999 commented Oct 8, 2019

For readability, issue was resolved from #966

Option 1:

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.

Option 2: (Not recommended)

DISPLAY=localhost:0.0 was set. Removing/Renaming this variable resolved the issue.

@psz2036
Copy link

psz2036 commented Oct 8, 2019

Sorry but unsetting DISPLAY is not a solution: you do need DISPLAY for X11 windows
(e.g. with Xming, or morr directly for the ssh options -X or -Y to make sense).

@psz2036
Copy link

psz2036 commented Oct 8, 2019

(Can someone re-open this, please... or tell me how to do?)

@psz2036
Copy link

psz2036 commented Oct 8, 2019

Seems that the comment of cwg999 should have been about #966 (not 996).
There (in #966) the issue is "resolved": was a bug, now corrected in sources...
so it will eventually make its way into the binary shipped with Windows10. Until
then, use the \dev\tty workaround (that is mentioned in #966, and independently
re-discovered and mentioned above).

@cwg999
Copy link

cwg999 commented Oct 8, 2019

You are correct, I fixed my comment.

@idanpa
Copy link

idanpa commented Jan 1, 2020

I see the same problem with:
Windows 10 18363.535
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
After unsetting DISPLAY problem fixed, but this is not a solution for me since I would like to use X11 forwarding.

@psz2036
Copy link

psz2036 commented Jan 1, 2020 via email

@idanpa
Copy link

idanpa commented Jan 12, 2020

mkdir \dev
echo x > \dev\tty

Fixed that issue, thanks

@xianwenchen
Copy link

I have the same problem on Cygwin64 on a freshly installed Windows 10 (installed today).

@riverar
Copy link

riverar commented Feb 11, 2020

@bagajjal Please re-open this. And provide status on resolution.

@blakeduffey
Copy link

I continue to have X Forwarding fail (it works via PuTTY)

i've created C:\dev\tty per the recommended work around

xterm: Xt error: Can't open display:
xterm: DISPLAY is not set

@SteveL-MSFT SteveL-MSFT reopened this Feb 19, 2020
@riverar
Copy link

riverar commented Feb 20, 2020

@blakeduffey what's your client command line? Presume it's some form of ssh -X or -Y user@host? What's the host running? What version of sshd?

@blakeduffey
Copy link

blakeduffey commented Feb 20, 2020

./ssh -K [email protected] -Y

Ubuntu 16.04.4

@riverar
Copy link

riverar commented Feb 20, 2020

@blakeduffey Can you provide the output of ssh -vvv -K -Y [email protected]? Feel free to redact any key data that may appear.

@riverar
Copy link

riverar commented Apr 14, 2020

@maertendMSFT Did a fix for this land in a shipping version of Windows?

@DrPepperBianco
Copy link

Hey, I've had the same problem today. Got it fixed with the \dev\tty solution.

I still don't understand, why this is closed. Creating linux folders in Windows is not a real solution but only a workaround. This issue should not be tagged as closed!

I'm looking forward to a real solution.

@blakeduffey
Copy link

Creating files in the root of C: is a short term workaround - I'm also not sure why this ticket would be closed.

@riverar
Copy link

riverar commented Aug 18, 2020

@maertendMSFT Ping.

@maertendMSFT
Copy link
Collaborator

This has been fixed in the latest release on GitHub. The Windows FOD bits lag a bit behind. Please try the latest release: https://github.com/PowerShell/Win32-OpenSSH/releases

@blakeduffey
Copy link

By 'latest release' you mean v8.1.0.0p1-Beta released in Dec 2019? I feel like that is the version I was trying with when I posted in FEB...

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

Successfully merging a pull request may close this issue.