I'm having trouble getting x11 forwarding when I ssh into a linux machine 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 have tried to follow the fixes suggested to this problem on stackoverflow but they don't seem to work.
I have tried editing ~/.ssh/config so that it looks like this:
Host *
XAuthLocation /opt/X11/bin/xauth
This does not fix the problem. Any ideas would be greatly appreciated.