ssh xterm xsession works but other programs error: X11 connection rejected because of wrong authentication
1
vote
0
answers
286
views
I setup xauth in part enough to get an xterm, xclock, etc. But any other program like gnome-terminal, a browser, still fails to authenticate. The two computers have the same user name and default ID 1000 and Group 1000.
Although I believe the xauth is working partially, I did a quick test with
xhost +
on the client, same results as below.
This is the error that needs to be fixed:
client$ ssh -X server
...
server$ gnome-terminal
X11 connection rejected because of wrong authentication.
Error creating terminal: No screen 0 on display "localhost:10.0"
# But this works and shows the xterm window on the client.
$ xterm
# Pop!_OS ubuntu 21.10
client$ egrep X11 /etc/ssh/ssh_config
/etc/ssh/ssh_config: ForwardX11 yes
/etc/ssh/ssh_config:# ForwardX11Trusted yes
client$ xauth list
client/unix: MIT-MAGIC-COOKIE-1 >
#ffff#abcdef012345#: MIT-MAGIC-COOKIE-1 >
client$ echo $XAUTHORITY
/run/user/1000/gdm/Xauthority
# There is no ~/.Xauthority
# Debian GNU/Linux 9 (stretch)
server$ egrep X11 /etc/ssh/sshd_config
/etc/ssh/sshd_config:X11Forwarding yes
/etc/ssh/sshd_config:#X11DisplayOffset 10
/etc/ssh/sshd_config:#X11UseLocalhost yes
/etc/ssh/sshd_config:# X11Forwarding no
server$ echo $DISPLAY
localhost:10.0
server$ xauth list
server/unix:10 MIT-MAGIC-COOKIE-1 >
# ~/.Xauthority is 52 bytes and owned by 1000:1000
# On the server XAUTHORITY is not setup automatically. It does not
# matter if I export XAUTHORITY=$HOME/.Xauthority
in the ssh session.
HEX SECRET A and B do not match (not sure if they need too)..
Asked by jcalfee314
(181 rep)
Feb 12, 2022, 01:34 PM