You may get the below error while running xhost + on Linux environment.
If your X Server running on Windows is Xming, then the fix is to be done from Xming's side, ie, from the Windows operating system.
The Xming logs shows the below error :
Hence, the rejection happens from the client running on Linux with IP address 192.168.1.7
The fix is to find the file X0.hosts in the installation folder of Xming (This, to me is on folder G:\Program_Files_(x86)\Xming). Open this file. You will see the content of this file will be a single line of localhost
Add the IP address of the host (in my case, 192.168.1.7) you want to connect to in the file X0.hosts
From the terminal, set the DISPLAY
Run xhost + again
$ xhost + access control disabled, clients can connect from any host xhost: must be on local machine to enable or disable access control.