[ale] SSH X11 Forwarding driving me nuts....

Jason Day jasonday at worldnet.att.net
Mon May 5 20:49:43 EDT 2003


On Sat, May 03, 2003 at 07:32:01PM -0400, Robert L. Harris wrote:
> 
> 
> Ok, I have 3 systems, A B and C for simplicity.
> 
> I ssh from A to B and type "xterm" and pop, it appears on A
> I ssh from A to C and type "xterm" and a couple mins later I get an
> error:
>   xterm Xt error: Can't open display: localhost:12.0

Try "ssh -v -v -v C", and see if there are any error messages.  If that
doesn't turn up anything useful, you can try starting up an ssh daemon
on a different port on C in debug mode (sshd -d -p 2222).  Then ssh to
that port, and the sshd process will spit out lots of debug info on
stdout.

> 
> I can do an "xhost +" on A then manually set my $DISPLAY on B to A:0.0
Was this a typo?  You meant C, right?
> and it will pop up the xterm just great.

ssh uses xauth instead of xhost for authentication, so you might want to
verify that xauth is working correctly on C.  Since both A and C have
/home on an nfs mount, both machines will use the same ~/.Xauthority
file.  This makes it a little easier.  First, make sure you have a
working .Xauthority file; type "xauth list", you should see, among
others, a line that looks like this:
    foo.domain.com:0  MIT-MAGIC-COOKIE-1  417bc129d0fbb94fcfcf1bde15908251
where "foo.domain.com" is the hostname of A.  If there is no line like
this, make an entry with the following command:
    xauth add (hostname of A):0 . `mcookie`

Then ssh to C, but disable X11 forwarding (ssh -x C).  Verify that the
DISPLAY variable is not set.  You should be able to type "xauth list"
and get the same thing you got on A.  You should see the same line
that's listed above.  If not, then either the home directories aren't
the same, or xauth is looking at a different file for some reason.
Next, set the DISPLAY to (hostname of A):0 and export it.  You should
now be able to type "xterm" and have it pop up on A.  If not, then there
is a problem with xauth, not (necessarily) ssh.

HTH,
Jason
-- 
Jason Day                                       jasonday at
http://jasonday.home.att.net                    worldnet dot att dot net
 
"Of course I'm paranoid, everyone is trying to kill me."
    -- Weyoun-6, Star Trek: Deep Space 9
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list