I'm having trouble getting x11 forwarding when I ssh into two different linux machines from a MAC operating Mojave. When I do ssh -X username@serveraddress, I get the following error appearing after I successfully login:

/usr/bin/xauth: error in locking authority file /home/username/.Xauthority 

I tried deleting the .Xauthority file on my mac and creating a blank one but this did not work. I'm guessing the issue is a permissions one since I have space on the computers I'm sshing into and on my Mac. The file permissions are currently this: -rw-------@ 1 djones staff 0 27 Feb 14:34 .Xauthority

Could you tell me if there is something wrong here?

  • 1
    The .Xauthority file lives on the machines you log into (X clients running on the remote machines use it to get a valid cookie), not on your Mac. So check permissions etc. on the remote machines. Also, man xauth. – dirkt Feb 27 at 14:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.