SSH Tunneling of X protocol from non-interactive session

From: Dobes Jiri (dobes_at_marian.fsik.cvut.cz)
Date: 10/10/05


Date: Mon, 10 Oct 2005 09:58:28 +0200

Hallo,

I need to forward X terminal through the firewall from non-interactive
session.

Situation:
M - my computer
F - firewall
C - cluster with application

M --- F ---- C

The final point is to run a X application on C from a queuing system and
display on M.

First setup simple test. I am sitting at M. I would like to open tunnel
from C to M tunneling X protocol.

M> xhost +
M> ssh -x C
C> ssh -L6001:localhost:6000 M

Now I try to run application on C and forward the X protocol to M. Open
another termimal (still leaving the tunnel opened) and

M> ssh -x C
C> export DISPLAY=C:1
C> xterm

and error message appear:
xterm Xt error: Can't open display: C:1

Does anybody know why? Is there a problem with authorization? On M all
the connections are allowed (it was xhost +).

If this would work I would write a script creating tunnel from C to M
and running the application on C with display C:1 forwarded to M. When
the script is executed terminal would open on my desktop...

Thanks for all the help!!!

                                Jiri

P.S.: I use OpenSSH_3.7.1p2, however I don't think it is important...