5

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
ᄂ ᄀ
  • 344
  • 3
  • 9
user1424739
  • 215
  • 1
  • 3
  • 10

2 Answers2

14

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.

Kenster
  • 3,025
  • 2
  • 13
  • 19
4

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.

dr-jan
  • 544
  • 3
  • 11