Linux X11 Connection Rejected Because of Wrong Authentication Error and Solution

last updated in Categories , , , , , , , ,

Q. I’m trying to login to my remote Ubuntu Linux server from Mac OS X desktop using following command:
ssh -X xeyes

But I’m getting an error that read as follows:

X11 connection rejected because of wrong authentication.

How do I fix this error?