Warning: No xauth data; using fake authentication data for X11 forwarding

When ssh'ing to a remote machine in Cygwin, I sometimes get:

Warning: No xauth data; using fake authentication data for X11 forwarding.

To fix it, simply type this on the local machine:

xauth add :0 . `mcookie`

Then, type the following to verify: xauth list

You should see something like:

user/unix:0  MIT-MAGIC-COOKIE-1  abcdef1234567890abcdef1234567890a
Your rating: None Average: 4.3 (21 votes)