Linux : SSH X11 forwarding xauth .Xauthority does not exist

By | February 24, 2023

The following message may show up the first time you SSH login to a X11 forwarding enabled machine :

/usr/bin/xauth: file /home/%user/.Xauthority does not exist

In order to workaround this issue, just do the following :

1. Create an empty file for the concerned user :

touch /home/%user/.Xauthority

2. Change the user/group permission to match the concerned user :

chown user:group /home/%user/.Xauthority