-   Linux - Newbie (
-   -   X11 connection rejected because of wrong authentication???????? (

Taylrl 12-07-2010 07:49 AM

X11 connection rejected because of wrong authentication????????

I am relatively new to linux but learning :-) At the moment I am trying to ssh into another machine and I want to be able to display the things on that machine on mine (A .pdf for example). I don't think its a problem with how I am logging as I am typing;

ssh -X username@externalhost

when I come to open a file or program that exists on that machine I am receiving the error;

X11 connection rejected because of wrong authentication
X connection to localhost:28.0 broken(explicit kill or server shutdown).

I have been having a look online and it does seem to be quite a common error which is normally resolved by editing the /etc/ssh/ssh_config file so that it says;

X11 Forwarding yes

instead of;

# X11 Forwarding no

Is this even right? Should I have removed the # and simply changed the "no" into a "yes"?? As you can probably see I am getting a bit confused and simply want to be able to display a .pdf remotely. Your help is most appreciated.


AlucardZero 12-07-2010 08:05 AM

Yes, sort of. This is normally a server setting. You should set X11Forwarding (no space) to yes in /etc/ssh/sshd_config (with the d) on the externalhost and restart SSHD.

ssh_config (no d) is a client setting and while it's possible X forwarding is disabled by your client, it would be rare.

Taylrl 12-07-2010 08:19 AM

Ok, thanks! I thought the sshd_config file was the same as the ssh_config file and was changing it on the client.

I have now found the sshd_config file on the externalhost and it was already set to allow X11Forwarding. Having had a further look about on the net, I have found that some people have a had a problem because they have been unable to save a /.X11authority file in a /inet folder. I can't seem to find this folder of any files with that name. Might this be the problem?

Taylrl 12-07-2010 08:30 AM

The linux fairies seem to have been working their magic as I am no longer getting this problem. I am 99% sure its nothing I have done.

Thanks for the help again!!!


AlucardZero 12-07-2010 09:51 AM

Right, if you can't write to your home directory (wherever it is) then X forwarding won't work. Glad to hear it's working now.

All times are GMT -5. The time now is 06:38 PM.