Error in locking authority file

When trying to connect using ssh, if you see a similar error to the following in the status log

/usr/X11R6/bin/xauth: error in locking authority file $HOME/.Xauthority

Try the following options:

  1. delete the .Xauthority file from your home directory then try to reconnect. A new .Xauthority file will automatically be created when you try to reconnect the next time.
  2. Check the text in the command field.
    Change the command from