Xhost + command is not working as expected

Dear ALL, i am managing a small Data center, where most of our users accessing our server through remote vnc session. before upgrading to rl8.10, we were using centos_7.9 , there, whenever user takes a new vnc session(tigervnc) in any server, we used to run xhost + command to make his existing remote display available for X11 forwarding. in next step, when we login to a non visualization node (of course passwordless ssh was configured ), this display varaibles are being transferred. and if werun xclock, it just works.
But since upgrading to rl8.10, if we do above steps, simply error comes that “Error: Can’t open display:xxxxx”…
looking forward if you have resolved this issue, kindly share your thoughts …Thanks.

If you are tunnelling using something like ssh -X or ssh -Y then you don’t need the xhost command.

Typically when I’ve seen a tunnel fail like this it is because the remote server doesn’t have the xauth command installed. You should be able to see this with ssh -v -Y remote

eg

% ssh -v -Y remote
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
debug1: Reading configuration data /home/sweh/.ssh/config
...
...
debug1: Sending environment.
debug1: Sending env LANG = C
debug1: Remote: No xauth program; cannot forward X11.
X11 forwarding request failed on channel 0

To solve this on the remote server dnf install xauth.

Now first time I log back in I see a message saying it’s creating a new authority file and DISPLAY is properly set.

debug1: Sending environment.
debug1: Sending env LANG = C
/usr/bin/xauth:  file /home/sweh/.Xauthority does not exist

$ echo $DISPLAY                                                  
localhost:10.0