. Advertisement .
..3..
. Advertisement .
..4..
I am working with programs and getting the error message:
Warning: No xauth data; using fake authentication data for X11 forwarding
Here is the detail of the code that I ran:
Host *
ForwardX11Trusted yes
ForwardAgend yes
ForwardX11 yes
I need an explanation for the problems I’ve encountered. How to fix warning: no xauth data; using fake authentication data for x11 forwarding.?
The cause:
You have got this error because you did not set up xauth data for your system.
Solution:
This error is solved only when you obtain a GUI environment on a distant server by letting Ubuntu base on Windows 10 operate ssh -X. To do that, you have to go through a multi-step process:
Step 1: Installing an X server on Windows, such as
Xming
and usingsudo apt install
to set upssh xauth xorg
in Ubuntu bash.Step 2: Access to the folder that includes
ssh_config
file, for example, my file is/etc/ssh
.Step 3: As an administrator, modify
ssh config
(USEsudo
). Exclude the#
from the linesForwardAgent
,ForwardX11
, andForwardX11Trusted
in ssh config, and change the appropriate parameters toyes
as the following:Step 4: Delete the front hash
#
from thessh_config
file beforePort 22
andProtocol 2
, and add a new line at the end of the file to specify the location of the xauth file,XauthLocation /usr/bin/xauth
at the same time. Don’t forget to insert your own path of the xauth file.Step 5: Now, you have completed modifying the
ssh_config
file, let’s save it before you get out of the editor. Next, you have to access to folder~
or$HOME
, addexport DISPLAY=localhost:0
to your.bashrc
file and finally let’s save it.Step 6: This is the final step. Your duty is restarting your bash shell, then launch the
Xming
application and you can operatessh -X yourusername@yourhost
. Finally, let’s delight with the GUI environment.Additionally, the issue is in Ubuntu which is a subsystem on Windows:
This issue occurred to me because my Fedora system didn’t have a
~/.Xauthority
file.The following commands were executed on my Fedora (Client Machine) to create one: