-
Notifications
You must be signed in to change notification settings - Fork 774
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
Using CTRL+C
in an SSH session with X11 forwarding and XAuthLocation
set will cause ssh to terminate with error
#1803
Comments
CTRL+C
in an SSH session with X11 forwarding and XAuthLocation set will cause ssh to terminate with errorCTRL+C
in an SSH session with X11 forwarding and XAuthLocation
set will cause ssh to terminate with error
same in 8.6.0.0 |
CTRL+\ seems to work OK in some cases - which may be a help to people until this is resolved... |
Same issue. And sometimes I notice that the issue will happen in:
Somehow I guess this is due to something outside of OpenSSH, related to windows. ((Get-Item (Get-Command ssh).Source).VersionInfo.FileVersion) Windows version is: 19044.1415 |
I can reproduce this with the When I place the following in my XAuthLocation "/Program Files/VcXsrv/xauth.exe" pressing Host myserver
ForwardX11 yes
ForwardX11Trusted yes terminates the session. (gi /Windows/System32/OpenSSH/ssh.exe).versioninfo.fileversion
# 8.6.0.1 Windows 11 build 22543 X64 |
Remove XAuthLocation from ~/.ssh/config because it traps CTRL-C in ssh sessions from the X11 Forwarding section, more info here: PowerShell/Win32-OpenSSH#1803 Signed-off-by: Rafael Kitover <[email protected]>
Something similar happens when port forwarding with
Only way I've found of ending the ssh process is to open task manager, find the |
Troubleshooting steps
https://github.com/PowerShell/Win32-OpenSSH/wiki/Troubleshooting-Steps
Terminal issue? please go through wiki
https://github.com/PowerShell/Win32-OpenSSH/wiki/TTY-PTY-support-in-Windows-OpenSSH
Please answer the following
"OpenSSH for Windows" version
((Get-Item (Get-Command sshd).Source).VersionInfo.FileVersion)
8.1.0.1
Server OperatingSystem
((Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion\" -Name ProductName).ProductName)
Debian 10.9 (4.19.0-16-amd64)
Client OperatingSystem
Windows 10 Pro (10.0.19043.985)
What is failing
Using
CTRL+C
in an SSH session with X11 forwarding andXAuthLocation
set to a program will cause ssh to crash with exit status-1
.Using VcXsrv here's a matrix of the outcomes where "Fail" indicates ssh exiting with status -1 and "Pass" indicates CTRL+C was passed through the connection (in my case to my shell on the server).
Note that these examples are to show which states cause
CTRL+C
to kill ssh, not all cases will succeed in forwarding X11.For access control enabled tests VcXsrv was run with
vcxsrv :0 -multiwindow -clipboard -wgl -swrastwgl -auth %USERPROFILE%\.Xauthority
and%USERPROFILE%\.Xauthority
was configured withxauth generate .
such thatxauth list
shows an entry. For access control disabled tests VcXsrv was run withvcxsrv.exe :0 -multiwindow -clipboard -wgl -swrastwgl -ac
.C:\Progra~1\VcXsrv\xauth.exe
-Y
C:\Progra~1\VcXsrv\xauth.exe
-X
C:\Progra~2\GnuWin32\bin\true.exe
-Y
C:\Progra~2\GnuWin32\bin\true.exe
-X
C:\Progra~2\GnuWin32\bin\false.exe
-Y
C:\Progra~2\GnuWin32\bin\false.exe
-X
C:\Windows\System32\calc.exe
-Y
C:\Windows\System32\calc.exe
-X
NUL
-Y
NUL
-X
C:\Progra~1\VcXsrv\xauth.exe
-Y
C:\Progra~1\VcXsrv\xauth.exe
-X
C:\Progra~2\GnuWin32\bin\true.exe
-Y
C:\Progra~2\GnuWin32\bin\true.exe
-X
C:\Progra~2\GnuWin32\bin\false.exe
-Y
C:\Progra~2\GnuWin32\bin\false.exe
-X
C:\Windows\System32\calc.exe
-Y
C:\Windows\System32\calc.exe
-X
NUL
-Y
NUL
-X
If there is no X11 Forwarding the setting of
XAuthLocation
is irrelevant andCTRL+C
is correctly passed.Expected output
No exit failure when
CTRL+C
is passed to the program running in the SSH session, even when X11 access control is enabled and configured.C:\Progra~1\VcXsrv\xauth.exe
-Y
C:\Progra~1\VcXsrv\xauth.exe
-X
C:\Progra~1\VcXsrv\xauth.exe
-Y
C:\Progra~1\VcXsrv\xauth.exe
-X
C:\Progra~2\GnuWin32\bin\false.exe
-Y
Actual output
Exit with status
-1
The text was updated successfully, but these errors were encountered: