"xauth: file /root/.Xauthority does not exist"really mean?
It means that the .Xauthority file, which stores X11 authentication cookies, does not yet exist in your home directory (in this case, /root/).
This is common when:
To work around the issue, follow these steps:
1. Make sure xauth is installed
# RHEL/Centos su - yum install xauth #Debian apt install xauth2. Make sure you use the -X flag (X forwarding) when connecting to the server
ssh -X root@yourserver3. On the server, edit the file /etc/ssh/sshd_config, and make sure these lines exist and are set to yes
X11Forwarding yes X11UseLocalhost yes4. Restart ssh daemon
systemctl restart sshd5. Try launching a graphical app, like xterm
If these work, your X11 forwarding is properly set up, and .Xauthority will be created automatically.
6. If you need to manually create the .Xauthority file
This is rarely necessary, but you can run:
touch ~/.Xauthority xauth generate :0 . trusted
No comments:
Post a Comment