Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question
Did you try turning on the X11 forwarding features on the server? – Ignacio Vazquez-Abrams Feb 25 '11 at 14:42
that is what i am trying but i am getting failed whatever i tried till now is listed above – Hunt Feb 25 '11 at 14:58

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 :

share|improve this answer
I just assumed he had. Another is Xming – Dennis Williamson Feb 25 '11 at 17:09

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

share|improve this answer

In your /etc/ssh/sshd_config you need the following lines:

X11Forwarding yes
X11DisplayOffset 10

The second line above is the default. The value controls the starting DISPLAY for forwarded display numbers.

share|improve this answer
Well , 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 – Hunt Feb 25 '11 at 16:09
@Hunt: You may need to pkill -SIGHUP -fx /usr/sbin/sshd to get sshd to re-read the config file. – Dennis Williamson Feb 25 '11 at 16:27
I tried the above command but the effect is same . still it is not enabled :( – Hunt Feb 25 '11 at 16:56
@Hunt: You do have an X server installed on your local machine, don't you? – Dennis Williamson Feb 25 '11 at 17:09
no i don't have X Server installed , is it required ? could you explain the procedure – Hunt Feb 25 '11 at 17:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.