-
Notifications
You must be signed in to change notification settings - Fork 775
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
Refuse to launch graphical applications from a remote shell. #427
Comments
The -X parameter is strictly tied to X11 and Windows doesn't support X11 (although you can install 3rd party X-Servers). Automatically wrapping it in RDP/remoteapp would be interesting, but seems outside the scope of OpenSSH. |
@SteveL-MSFT Then maybe launching, for example, calc should fail with the error "Cannot locate display" |
I can see how this can be useful if there is a configuration setting for this as this is a change in behavior on how Windows remoting has worked, but would be shell specific and probably implemented in, for example, powershell exe rather than in OpenSSH. |
While fancy stuff like RDP is interesting, I'd much rather that just bog standard -X worked, assuming an X11 server installed like vcxsrv or xming and the like. PuTTY manages. |
So VcXsrv is not supported by this version of Portable OpenSSH right? What a pity, it works so great with PuTTY. So it is too early to uninstall PuTTY in favor of OpenSSH? |
@FranklinYu Windows doesn't use X for Windows apps, which was the topic here. If you are launching remote Linux apps, I believe that win32-openssh does support forwarding X to a local x server. |
You aren't paying attention. I am talking about connecting from linux or windows to a windows shell (cmd or powershell) on a remote windows computer running openssh-server |
@fpqc Sorry I got confused. In your case the remote machine is Windows, but in my case the remote is a Linux, right? |
Yes. I think X forwarding from a Linux remote to Windows local machine running win32-openssh should work as usual, but I am not sure and haven't tried. |
Then we are talking about the exact same scenario, and I have not explained it well. backgroundI know some basic concept about SSH connection, but I have no idea how X-Forwarding works. My remote is a Linux VM, with some GUI application installed. My local machine is Windows, with Portable OpenSSH (aka Win32-OpenSSH) installed. X server is also installed in local Windows machine, that is the “VcXsrv” I mentioned. Portable OpenSSH storyI started the local X server on Windows on DISPLAY=localhost:0.0 ssh -X franklinyu-linux I expected this to “just work”, but in the SSH session, 1. I’m not with my machine now, sorry. I may find the exact message tomorrow. other experimentsI tried PuTTY (because there is many tutorials for PuTTY + VcXsrv). Simply replacing OpenSSH with PuTTY worked (PuTTY need to be told about I tried (temporarily) disabling authentication in my local X server (VcXsrv). After that I manually set |
file a new issue |
In a *nix environment, trying to launch a graphical (X11) application when in an ssh session will fail because no X11 server will be specified (and specifying a display on the server will likely fail because the X11 server running will require authentication ordinarily unavailable to the remote user. Such an application can be launched if SSH is launched with the -X flag, which enables X11 forwarding over the wire.
Since Windows does not directly use X, and most Windows applications are not X clients, launching them on a remote Win32-sshd should either fail, or if not fail, launch the application over something like remoteapp/rdp (assuming the -X flag is specified).
Example of the problem: ssh into a Windows box running Win32-openssh, and launch calc. This calc application is inaccessible to both remote and local users, but it will be visible on the SSH server in the task manager.
The text was updated successfully, but these errors were encountered: