Either you have changed your hostname or any similar activity on your system that's why other system is not identifying you.
Solution :
Run this command on terminal
Solution :
Run this command on terminal
xauth add :0 . `mcookie`
To check whether your hostname is added in the list or not, runxauth list
Now ssh into other system, you will not get this error.