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

Re: X won't forward (ssh -X)



<quote who="Lars Jensen">
> After switching to woody from potato, I'm having problems with
> setting the display on a remote machine:
>
> Both machine A and B below runs woody.
>
> I ssh from machine A into machine B with ssh -X, and when I run any
> X-application (like xclock) I get an instant error:
> "Error: can't open display"

check the sshd config on the server your connecting to.
be sure it has X11forwarding turned on. if its not,
turn it on and restart sshd.

another thing is be sure if your trying to some fancy
su stuff be sure that you don't "su -" as that will wipe
out your enviornment settings, usually taking the custom
X/ssh stuff with it(you can probably re set the variables
manually tho i have not tried this).

also helps to turn on debugging(ssh -v). my command
line for ssh is:
ssh -l username -v -C hostname -X
(i lose the -X unless i specifically need X forwarding)

if X forwarding is on, on both client and server you
should see something like:
debug1: Requesting pty.
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Requesting shell.
debug1: Entering interactive session.

if forwarding is off on the remote server you'll see:
debug1: Requesting pty.
debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Remote: X11 forwarding disabled in server configuration file.
Warning: Remote host denied X11 forwarding.
debug1: Requesting shell.
debug1: Entering interactive session.






Reply to: