When starting an SSH session, if you get the error Cannot Open Display in X-Win32’s status window, the remote host may not have X11 Forwarding (or X11 Tunneling) enabled. SSH sessions use X11 Forwarding by default to connect the remote X Client (e.g. xterm, konsole, mozilla, firefox, dtterm, gnome-terminal, etc.) back to X-Win32.
To fix this problem you need to enable X11 forwarding on your remote ssh server (or sshd, typically OpenSSH):
- Find your sshd_config file
- For OpenSSH on Linux, this is typically located at /etc/ssh/sshd_config (note: this is not the same as /etc/ssh/ssh_config, which is used for configuring the ssh client settings)
- Read the man page for sshd_config, which may specify the location of the file (run man sshd_config)
- If you still cannot find the file, run find / -maxdepth 3 -name sshd_config to try to find it
- Edit the file as root
- Find the line
or the line
- Change the line to
- Save the file
- Restart sshd
You can enable X11 Forwarding on an individual user basis.
- Create or Edit the $HOME/.ssh/config file
- Add the line