How can I prevent the warning No xauth data; using fake authentication data for X11 forwarding?

None of the posted solutions worked for me. My client (desktop) system is running macOS 10.12.5 (Sierra). I added -v to the options for the ssh command and it told me,

debug1: No xauth program.

which means it doesn’t have a correct path to the xauth program. (On this version of macOS the path to xauth is nonstandard.) The solution was to add this line to /etc/ssh/ssh_config (may be /etc/ssh/config in some setups) or in ~/.ssh/config (if you don’t have admin rights):

XAuthLocation /opt/X11/bin/xauth

Now the warning message is gone.

Leave a Comment