4

From my (Debian) Desktop machine, I am trying to ssh into a Debian Server with

 ssh -X remote-ip

After logging into the remote host, I get:

 /usr/bin/X11/xauth:  creating new authority file /root/.Xauthority
 /usr/bin/X11/xauth: (stdin):1:  bad display name "unix:10.0" in "remove" command
 /usr/bin/X11/xauth: (stdin):2:  bad display name "unix:10.0" in "add" command

And the X Forwarding doesn't work. From my Desktop I can ssh -X into other Debian servers and it works fine. I found a lot of threads discussing similar issues on google, but they all seem to fade out without a solution, and the simple things suggested there like exporting DISPLAY or setting xhost + don't seem to make a difference.

3 Answers 3

1

Try -Y instead of -X

ssh -Y remote-ip

From the ssh man page, this "Enables trusted X11 forwarding. Trusted X11 forwardings are not subjected to the X11 SECURITY extension controls."

If this works, you can add to ~/.ssh/config:

Host remote-ip
ForwardX11Trusted yes

and you won't need to explicitly add -Y.

To figure out why this remote machine behaves differently from the others, take a look at the sshd_config file -- found in /etc/ssh/sshd_config on RedHat. I'm don't know if it's in a different location on Debian.

There's more discussion of related issues in another SuperUser question.

1

Add the host name you're connecting to your dns or hosts file. reconnect using ssh -X root@hostname rather than ip. - delete any offending keys if necessary.

0

I was unable to resolve this, even after making sure the config files were the same on the working and non working machines. As a workaround, I installed x11vnc and used the vnc protocol instead of X11.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .