Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

3 Answers

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.

share|improve this answer
add comment
up vote 0 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.