[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: x-forwarding with ssh



On Wed, 6 Mar 2002, Tom Cook wrote:

> My 2 bits worth of experience:

> tkcook@pinky:~$ xterm
> xterm Xt error: Can't open display: 

This shouldn't be happening; my results:

nujoma:~> ssh -v -X geingob
SSH Version OpenSSH-1.2.3, protocol version 1.5.
...
aperrin@hm269-26876:~$ xterm
debug: Received X11 open request.
debug: channel 0: new [X11 connection from 152.2.242.190 port 2160]
debug: channel 0: OUTPUT_OPEN -> OUTPUT_WAIT_DRAIN [rvcd IEOF]

(and the xterm opens)

> tkcook@pinky:~$ export DISPLAY=jmelhuish:0.0

This really shouldn't be happening; you're telling the remote host to send
packets directly, NOT through the ssh tunnel. (I'm assuming jmelhuish is
the local machine and pinky the remote one.)

> tkcook@pinky:~$ xterm
> debug: Received X11 open request.
> debug: channel 0: new [X11 connection from pinky.its.adelaide.edu.au
> port 32981]
> debug: channel 0: OUTPUT_OPEN -> OUTPUT_WAIT_DRAIN [rvcd IEOF]
> debug: channel 0: OUTPUT_WAIT_DRAIN -> OUTPUT_CLOSED [obuf empty, send
> OCLOSE]
> debug: channel 0: shutdown_write

...but then I really don't understand why this is happening; why are you
getting debug information from the ssh session when you've told it to
ignore ssh and send packets directly through?  Here's what I get in the
same situation:

aperrin@hm269-26876:~$ export DISPLAY=nujoma:0.0
aperrin@hm269-26876:~$ xterm
Xlib: connection to "nujoma:0.0" refused by server
Xlib: Client is not authorized to connect to Server
xterm Xt error: Can't open display: nujoma:0.0

Can you, or anyone on the list, explain why your posted situation
works? I'm very puzzled.

> ie. it worked once I exported DISPLAY.

It does look like the OP's problem is that DISPLAY isn't being set, but it
shouldn't be -- and shouldn't even work when -- set to local:0.0.  It
should be set to remote:x.0, where x is a number > 0 assigned by the
remote host. Mine, for example, gets set to:

aperrin@hm269-26876:~$ echo $DISPLAY
hm269-26876:11.0

automatically, where hm269-26876 is the remote machine.

ap

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin@unc.edu - http://www.unc.edu/~aperrin
 Assistant Professor of Sociology, U of North Carolina, Chapel Hill
      269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA






Reply to: