failed to enable x11 forwarding
Solution 1
Putty is not enough to enable X11 forwarding on Windows, you must have a X Server installed too.
You can for example install Cygwin X : http://x.cygwin.com/
Solution 2
Check if you have installed the xauth package.
It should be in the ports tree under x11/xauth
Just enabling X11 forwarding in /etc/ssh/sshd_config
list not the complete solution
The same applies to Linux operating systems If you get no DISPLAY variable you might install the xauth package and you are done
Related videos on Youtube
axiorema
Updated on September 17, 2022Comments
-
axiorema over 1 year
I am trying to enable X11 forwarding on my server which is running on FreeBSD 7.1.
I have a putty installed in my windows in which i have enabled X11 forwarding by
checking on Enable X11 forwarding
and specifying following parameter
X display location localhost:0
after that i run putty and checked whether X11 is enabled or not by typing following command
echo "$DISPLAY" or echo $DISPLAY
but i am getting following error
DISPLAY: Undefined variable.
Even i have installed XManager but in that also i am getting following error
The X11 forwarding request was rejected ! To solve this problem, please turn on the X11 forwarding features of the remote SSH server
can anyone suggest me how to get rid off this ?
-
Ignacio Vazquez-Abrams about 13 yearsDid you try turning on the X11 forwarding features on the server?
-
axiorema about 13 yearsthat is what i am trying but i am getting failed whatever i tried till now is listed above
-
-
axiorema about 13 yearsWell , i have found this lines under sshd_config file and i edit it using VI editor by removing # in front of them , but still getting the same problem
-
Dennis Williamson about 13 years@Hunt: You may need to
pkill -SIGHUP -fx /usr/sbin/sshd
to getsshd
to re-read the config file. -
axiorema about 13 yearsI tried the above command but the effect is same . still it is not enabled :(
-
Dennis Williamson about 13 yearsI just assumed he had. Another is Xming
-
axiorema about 13 yearsno i don't have X Server installed , is it required ? could you explain the procedure
-
axiorema about 13 yearsso after installing do i still need to configure above mentioned attribute via putty .. bcoz i haven't passed that stage yet.
-
Dennis Williamson about 13 years@Hunt: Yes, the remote system needs to be configured to forward X11 and the local system needs something to forward it to. Once everything is set up, you can use PuTTY to ssh to the remote host. On the remote host, you can start an X11 client (e.g. emacs or xeyes). Sshd then forwards the output to the X11 server on your local machine via the ssh connection through PuTTY. Then the X11 server displays the output.
-
axiorema about 13 yearsi have installed xServer on my windows machine , i opened it and a white window appears now i really don't have any idea what to do
-
Dennis Williamson about 13 years@Hunt: Which one? I'll assume Xming. You may want to have it run in Multiple Window mode instead of On Window mode. In any case, you should be able to start PuTTY, ssh to your remote host and start an X client. You haven't said what it is you want to run, but you can try xeyes, gedit, gnome-terminal, or whatever you'd like that's installed on the remote system.
-
axiorema about 13 yearsfirst i start putty having remotely connected with my server which is running Freebsd 7.1 after that i started the Xserver of CygwinX now both the shells are open but when i tried on jar file it is still displaying "No X11 DISPLAY variable was set". this jar file has the GUI.
-
axiorema about 13 yearsis freebsd os is creating a problem because i tired on my another server which is running UBUNTU , i tired xclock and everything is running fine
-
axiorema about 13 yearsI have installed xclock on my freebsd servver and after editing config file i restart the sshd using /etc/rc.d/sshd restart command and try to run xclock so now it is showing me Error: Can't open display: