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

A. Koenig picture A. Koenig · Oct 15, 2016 · Viewed 32.4k times · Source

I have an unfortunate problem when making ssh connections from Fedora 23 to Centos 7. The commands ssh -X user@centos7 and ssh -Y user@centos7 both print Warning: No xauth data; using fake authentication data for X11 forwarding.

Googling shows to add the following lines to /etc/ssh/ssh_config:

Host *
    ForwardX11Trusted yes
    ForwardAgend yes
    ForwardX11 yes

But this didn't make the warning message go away.

Answer

HeatfanJohn picture HeatfanJohn · May 21, 2017

For me this issue was caused by my Fedora system not having an ~/.Xauthority file.

I created one by executing the following commands on my Fedora system (Client machine):

xauth add :0 . `mcookie`