Just to complement the excellent ton's answer.
I have once had exactly the same problem because my home directory had become 100% full. Upon connection, ssh
created an empty ~/.Xauthority
and was unable to write any single entry to it (so that xauth list
had always produced an empty output).
So I suggest one always checks the free space (e. g.: df -h
) and verifies that xauth generate
and xauth add
have indeed had any effect (xauth list
).