Re: SSH Tunneling of X protocol from non-interactive session
From: Mihai Osian (zzz_at_zzz.com)
Date: 10/12/05
- Next message: Todd H.: "Mac OSX -> linux x11Forwarding struggles, invalid name errors?"
- Previous message: Dobes Jiri: "Re: SSH Tunneling of X protocol from non-interactive session"
- In reply to: Dobes Jiri: "Re: SSH Tunneling of X protocol from non-interactive session"
- Next in thread: Wayne Throop: "Re: SSH Tunneling of X protocol from non-interactive session"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 12 Oct 2005 14:34:29 +0200
Dobes Jiri wrote:
> Mihai Osian wrote:
>
>> Mihai Osian wrote:
>>
>>> Dobes Jiri wrote:
>>>
>>>> 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...
>>>>
>>>
>>> First remark: why exactly do you want to forward the X connection
>>> manually instead of letting ssh do the dirty work (M>ssh -Y C) ?
>>
>
>
> I cannot use -X or -Y option, because I have to run
> *noninteractivelly* from computer C to display M. I plan to sumbmit
> script like
>
> export DISPLAY=C:1
> xterm -e gdb my_executable
>
> while there is a open tunnel from C:6001 to M:6000.
>
> It is because C is a 50 nodes cluster and I need to run debuging job
> in a parallel enviroment. I don't sit on front of the C, but at
> terminal M, it is 1000 km away [700 miles]. Normally, you have to
> prepare script on C, submit the script using PBS system and when the
> cluster is free [usually imediatelly] the job starts. When the job
> starts, I would like it to open terminal with the debugger on my
> computer M and I can start to debug interactivelly. I was doing that,
> but there is a firewall now and I don't know how to work it out.
>
> >> Second: Are you sure that X is listening on localhost:6000 on M ? It
> >> might be possible that the X server was launched with the -nolisten
> flag.
>
> It should be listening. The X is running with
> /usr/X11R6/bin/X vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-qCOhba
> I can go to another machine, point display to M:0.0 and open a
> terminal. How can I recognise on which port does it listen (it should
> be 6000 normally). netstat -a gives me this line:
> tcp 0 0 *:x11 *:* LISTEN
>
> Any idea?
>
> Jiri
Humm... One question, regarding the following line:
C> export DISPLAY=C:1
"C:1" might refer to C's external IP address, while the ssh tunnel is
made to the loopback address (localhost:6000 on C). Once the tunnel is
setup, can you run "telnet localhost:60001" on C and get a successful
connection ? If you can not, then try this:
C> export DISPLAY=localhost:1
and see what happens.
Mihai
- Next message: Todd H.: "Mac OSX -> linux x11Forwarding struggles, invalid name errors?"
- Previous message: Dobes Jiri: "Re: SSH Tunneling of X protocol from non-interactive session"
- In reply to: Dobes Jiri: "Re: SSH Tunneling of X protocol from non-interactive session"
- Next in thread: Wayne Throop: "Re: SSH Tunneling of X protocol from non-interactive session"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|