No xauth program; cannot forward X11
Solution 1
Both your client and the server are complaining that they can't find the xauth program. The "debug1: No xauth program" message comes from your client, saying it can't find a copy of xauth
locally. The "Remote: No xauth program; cannot forward X11" message is from the server, saying it can't find xauth either. The default location for both client and server is /usr/X11R6/bin/xauth
, though your vendor could change it.
For the client, you can set the Xauth location in your .ssh/config:
XAuthLocation /some/path/to/xauth
For the server, you must set the location in the remote server's sshd_config:
XAuthLocation /opt/X11/bin/xauth
After modifying the config, you should run sshd -t
to validate the config, then restart sshd
to make it reread the file.
Solution 2
I had to install xauth using dnf:
dnf install xauth
Then everything started working as expected. For older Redhat systems use 'yum' instead of 'dnf' in the command above.
user1424739
Updated on September 18, 2022Comments
-
user1424739 over 1 year
I got the following error message when I use
ssh -v -Y
. The server OS is mojave. Does anybody know what is wrong?debug1: No xauth program. Warning: No xauth data; using fake authentication data for X11 forwarding. debug1: Requesting X11 forwarding with authentication spoofing. debug1: Sending environment. debug1: Sending env LANG = en_US.UTF-8 debug1: Remote: No xauth program; cannot forward X11. X11 forwarding request failed on channel 0
-
larsks over 4 yearsDo you have X11 installed on your MacOS system?
-
user1424739 over 4 yearsHow to check it? I have this
$ which xauth /opt/X11/bin/xauth
-
larsks over 4 yearsIs that on the server?
-
user1424739 over 4 yearsYes. It is on the server.
-
larsks over 4 yearsIn that case, I'm not sure why you're getting that error. I don't have a MacOS system on which I can check. Hopefully someone else will help out!
-