Fixing X11 connection rejected because of wrong authentication

You get either “X11 connection uses different authentication protocol” or “X11 connection rejected because of wrong authentication”.

The thing is, this is a very generic error message that will take you to multiple very different fixes.

Many telling you to set a variable here and change a setting there.

In my case, it was because the SSH server had a configuration under /etc/ssh/sshrc.

I found the answer here.

In my case, sshrc only had comments as I had stopped to use the file, so I just removed the config file and ssh -X user@server xclock worked again.




Thanks for reading this post!


Did you find an issue in this article?

- click on the following Github link
- log into Github with your account
- click on the line number containing the error
- click on the "..." button
- choose "Reference in new issue"
- add a title and your comment
- click "Submit new issue"

Your feedback is much appreciated! πŸ€œπŸΌπŸ€›πŸΌ

You can also drop me a line below!