X11 connection rejected because of wrong authentication.

When I log in with

ssh -Y wgscott@another.computer


I am greeted with the lines

X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.

This happened after I was logged in, changed to root, then changed to another user using su.

Funny thing is, the X11 connection works fine, but I would like to get rid of the annoying message.

I trashed .Xauthority but that did not help.

I only get the error with ssh -Y

Posted on Sep 17, 2005 11:08 PM

Reply
4 replies

Sep 18, 2005 8:42 AM in response to Bill Scott

Hi Bill,
You're fairing better than I; the connection actually fails for me. Is the user to which you su from root also a user on your local machine? In my case it wasn't a local user and not only did I get the message you got but my connection was broken and the app I launched exited. I'm not sufficiently knowledgeable about X11 authorization to know how to authorize a connection for the new user.

I've probably read more about X11 authorization than most here but I've never read an account that explained enough to allow me to know what occurs in all circumstances. It was my impression that X11 authorization was host-based so I'm naturally confused as to why the change in user matters. I'm looking forward to hearing an explanation for what's going on here.
--
Gary
~~~~
We all know that no one understands anything that isn't
funny.

Sep 18, 2005 8:39 PM in response to Bill Scott

Hi Bill,
I'm confident that nothing was changed on my machine. Since you didn't mention a failure with root and my root user seemed to have no problem, it sounds like a new X11 connection requires that the user opening the connection have write privilege to a file owned by the original user. (me) When a user without that privilege tries to open an X11 connection, the write operation to that file fails. It would be my guess that the file is the socket file on the remote machine that actually represents the remote end of that X11 connection. However, I'm not certain that such a socket file exists on the remote X11 client. The only one of which I'm sure is the one in /var/tmp on the X11 server.
--
Gary
~~~~
Brain fried -- Core dumped

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

X11 connection rejected because of wrong authentication.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.