X11 Forwarding solution

Chris Horn chorn@rand.org
Sat Mar 8 04:04:00 GMT 2003

I think I've figured it out.  The critical missing factor was xauth on the 
remote machine.   I've summarized how I managed to get things to work below.


I have a machine that I am sitting at, we shall call it local.  It is from 
here that I am running the ssh client to log into the remote machine and 
run my X11 app across the network.

The remote machine can also be called the server, and is running 
sshd.  This server machine has the X application that I wish to run.

The remote box does NOT have to have an X server installed.  It is a 
server, it doesn't need X; as long as the X applications have their 
libraries on the server, everything will be fine.  The server must, 
however, have some X applications installed on it (e.g. ethereal).  Without 
them, what would be the point of X11 forwarding!?!

The server also MUST have a local copy of xauth for the ssh X11 forwarding 
to work.  SSH uses the xauth on the local machine to set up an xauth entry 
for the dummy X server that it sets up.  For Debian, this can be 
accomplished by installing the xbase-clients package.

On the remote box, I also had to set the X11Forwarding variable to 'yes' in 
sshd_config.  After telling sshd to reload its configuration files (or 
restarting it), I was able to do the normal steps to forward X11.

ssh -l <username> -XC <remote_machine>

You may also need to use the -A option to enable forwarding of the 
authentication agent connection.  I'm not really sure of what this means, 

Be sure to check the command line parameters for your copy of ssh.  I know 
that on a SunOS maachine, I use a command-line that looks like this:

ssh -l <username> +X +C +a <remote_machine>

Where the +a is that optional forwarding of the auth agent connection...

I hope this clears it up for everyone.
Thanks for your help!

703.413.1100 x5100

More information about the Cygwin-xfree mailing list