Is it possible to launch an X11 application and have it use an X11 server on the other side of a bastion host? Specifically, here's my setup:
my laptop ------------- bastion -------------- remote host
I have putty installed on my laptop. The bastion is rhel 6.5 and the remote host is CentOS 6.3. Also, putty is installed on the bastion. I have an X Server running on my laptop.
Using xclock as a test app, what works fine are these two scenarios:
my laptop ------------- bastion -------------- remote host
[A] X Server <------------- xclock
X Server <----------- xclock
.. in each case I needed to set up X11 forwarding, and that is working fine.
However, what I'm really trying to get is xclock from the remote host to display all the way back on my laptop's X Server:
my laptop ------------- bastion -------------- remote host
X Server <------------- [ ] <------------- xclock
My tools on both the laptop and bastion are either putty or ssh.
I tried, for example, running this from my laptop:
remote% ssh -X user@bastion ssh -X user@remotehost xclock
or:
laptop% ssh -X user@bastion ssh -X user@remotehost
remote% xclock
I thought maybe I need an ssh tunnel on the bastion, but the X11 packets seem to be coming on the ssh port (22), so I wasn't exactly sure how to set up the tunnel. I tried source port 22 destination laptop:6000 (and 6010) to no avail.
.