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

Update _PATH_TTY to point to the console #447

Closed
wants to merge 1 commit into from

Conversation

AJDurant
Copy link

@AJDurant AJDurant commented Jun 23, 2020

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.
Fixes PowerShell/Win32-OpenSSH#966,
fixes PowerShell/Win32-OpenSSH#1515,
fixes PowerShell/Win32-OpenSSH#762,
fixes PowerShell/Win32-OpenSSH#1088,
fixes PowerShell/Win32-OpenSSH#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)

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)
@ComputerDoktor
Copy link

ComputerDoktor commented Sep 21, 2020

Please repair openssh basic feature X11 forwarding for Win32!
Should work without hard to find workarounds.
C:>set DISPLAY=localhost:0
C:>ssh -Y localhost
CreateProcessW failed error:2
ssh_askpass: posix_spawn: No such file or directory
Permission denied, please try again.

@bagajjal
Copy link

bagajjal commented May 4, 2021

@AJDurant - I fix this issue in a new PR. The intention for creating a new PR is to fix the change in the correct file, debug and resolve the CI test failures.

Appreciate your efforts. Thank you.

@bagajjal bagajjal closed this May 4, 2021
@AJDurant
Copy link
Author

AJDurant commented May 4, 2021

@bagajjal I'm really pleased it's fixed!

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