ssh/X tunneling through remote firewall

Mark Gordon mark.cyg@ruddygore.net
Mon Sep 10 16:48:00 GMT 2001


On Mon, 10 Sep 2001 15:06:11 -0700 (PDT), Fred Ramsing
<framsing@unr.edu> wrote:

>This is really a question about ssh rather than about cygwin-xfree
>development, but I'd really appreciate any help.
>
>I recently installed cygwin-xfree for Window$98.  I can successfully
>connect from the Win98 PC via ssh to my Linux box, but I cannot run
>X-clients under the cygwin-xfree86 X-server when the firewall on the
>remote Linux box is running.  I believe this is because I am not
>implementing X tunnelling properly through ssh.  The X-clients do run
>properly when the remote host firewall is down.  Note that there is no
>firewall on the localhost running cygwin-xfree86.  I am doing a variant of
>the following from an cywin-xfree xterm:
>
>$> xhost +
>$> ssh login_name@remotehost_ip
>enter password
>$> export DISPLAY=localhost_ip:0.0
>$> xterm &                       # or some other x program
>and I receive the error: Can't open display: localhost_ip:0.0

<snip>

Try 'man ssh' and search for X11 and you will find the following on
the configuration file:

  ForwardX11
     Specifies whether X11 connections will be automatically redirect-
     ed over the secure channel and DISPLAY set.  The argument must be
     ``yes'' or ``no''. The default is ``no''.

If you use the built in forwarding you don't have to use the xhost or
exports, it all works automatically. If you read the rest you might
find out how to do all sorts of other things (I can look at my
companies internal web site from home!).

This is all standard ssh functionality.
-- 
Mark Gordon - To email me replace spamtrap with mark.gordon
	DNA: National Dyslexic Association.



More information about the Cygwin-xfree mailing list