Linux – enable PuTTY users to have X11 forwarding (Redhat 5 server)

puttyredhat-enterprise-linuxterminalx11-forwarding

I want to enable graphical forwarding for my server. I am connecting via PuTTY and click the X11 forwarding, which works with other servers. None of the other topics on this site have helped me so far but I tried looking around. Can anyone help? Thanks.

[lkatz@localhost ~]$ echo $DISPLAY
localhost:10.0

On the Redhat server in question, I edited /etc/ssh/sshd_config to include the following lines (per another site's instructions):

AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes

However when I try a graphical program via PuTTY on Windows I get these error messages:

[lkatz@localhost ~]$ gedit
The application 'gedit' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.
[lkatz@localhost ~]$ Mauve
X connection to localhost:10.0 broken (explicit kill or server shutdown).
[lkatz@localhost ~]$ gnome-terminal
The application 'gnome-terminal' lost its connection to the display localhost:10.0;
most likely the X server was shut down or you killed/destroyed
the application.

Best Answer

  • Make sure you have xorg-x11-xauth installed.

  • Check SSH logs (PuTTY: Ctrl+right-click, choose "Event log").

Related Question