Forwarding X11 with one hop without X-server installed

christophwu asked:

problem

I want to run X-applications remotely on a machine C from my client A. The only way to connect to this machine is by using machine B (firewall) as a hop:

A –> B –> C

So far, simple ssh works as expected, however I can’t get X11 forwarding running.

I have found some similar questions, but I think they all assume that X11 is running on B. Solutions like How to enable SSH X11 forwarding through additional server? seem not to be working with my setup.

Could it be that you need to have a X-server running on B to forward X11 from C to B and B to A?

setup

I have set up my ~./ssh/ssh_config on A according to this article: http://sshmenu.sourceforge.net/articles/transparent-mulithop.html

When I try to connect and forward X11 from C by using

$A: ssh -X C

I get connected to C through B, but without X11 forwarding (although enabled on B and C):

$C: echo $DISPLAY

$C: glxgears 
Error: couldn't open display (null)

machines used

  • A: Arch Linux 3.13.7-1-ARCH notebook running X-server/gnome
  • B: Debian 6 Linux 2.6.32-5-amd64 pc no X-server installed/running
  • C: OpenSuse 13.1 3.11.10-7-desktop pc running X-server/gnome

conclusion

I’m not sure if the problem exists because of my configuration/setup or this would not word in general…
I would appreciate if anyone with similar problem/experience could help me out!


I answered:

You have to use -X to enable X11 forwarding, but you forgot to put this in your ProxyCommand. Just add in the option.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.