I am trying to use X11 forwarding using the following command while XMing is running (using XLauncher):
ssh -X2 user@server:port
but it does not set the DISPLAY
environment variable, which I believe because it did not recognize the X11 forwarding connection. I tried setting it manually to something like: :0
, :0.0
, localhost:10.0
, localhost:11.0
, localhost:0.0
, or some_addr:some_number
, but none of them worked. Then, I tried SSH'ing to my server using Putty, which I did not find problems getting X11 forwarding with it (but I need the SSH session in my Windows cmd-line and not Putty), and then get the value set for DISPLAY
and set in my other session logged in in my Windows cmd-line SSH. Using the latter method made X11 work for Windows cmd-line SSH, but as soon as I close the other Putty session, I would no longer be able to get the X11 forwarding again.
I need to be able to get X11 forwarding using nothing but the original Windows cmd-line SSH (I don't want to use plink.exe
as it does not handle CTRL-C, CTRL-D, ...etc., and rather use the default handlers for any binary for such actions (e.g. close plink.exe on ctrl-c)).