Search code examples
linuxsshx11forwarding

How does mobaXterm know whether x11 forwarding is working on remote server?


When using SSH mode to connect to some linux servers:

For some servers, mobaxterm shows "X11-forwarding : ✔ (remote display is forwarded through SSH)" and I can start some gui application in local windows.

For some servers, mobaxterm shows "X11-forwarding : ✘ (disabled or not supported by server)

My question is, how does mobaxterm know this information? On both servers I've configured /etc/ssh/ssh_config to have:

X11Forwarding yes

ForwardX11 yes

I'm not sure which config line really works so I had both. Question is, how does mobaxterm know, is it part of ssh communication to tell, whether the linux server supports ssh forwarding or not?


Solution

  • I was having a similar problem: MobaXterm was saying one of my servers DID support X11 forwarding, and the other didn't. This was maddening, as the /etc/ssh/ssh_config files were identical. My problem was answered here.

    Seems you are looking in the wrong place, like I was.

    • The file /etc/ssh/ssh_config configures SSH clients on your host.
    • The file /etc/ssh/sshd_config configures the SSH server on your host.

    Thus, check for the line "X11Forwarding" in your /etc/ssh/sshd_config file. (Note the "d".) If uncommented and set to "yes", then X11 forwarding should work... and I bet MobaXterm will detect this.