Automatic forwarding of the X11 display to a remote computer is highly recommended with the use of SSH and a local X server. To set up automatic X11 forwarding with SSH, you can do one of the following:
- Command line: Invoke
ssh -X <host>. Note that use of the
-x(lowercase x) option will disable X11 forwarding. The use of the
-Yoption (instead of
-X) is necessary on some systems to enable "trusted" X11 forwarding.
- Configuration file: Edit (or create) the
.ssh/configfile to have the following line in it:
All X11 programs will go through the encrypted channel, and the connection to the real X server will be made from the local machine.
DISPLAYenvironment variable set by SSH will point to the remote machine but with a display number greater than zero. This is normal and happens because SSH creates a proxy X server on the remote machine for forwarding the connections over the encrypted channel. The user should not manually set the
DISPLAYvariable because then a non-encrypted channel could be used.
- Graphical Menu: Many SSH clients have a menu to change the configuration settings. For example, to change the setting in PuTTY, check the box next to
Connection --> SSH --> X11 --> Enable X11 ForwardingAs with the previous item, there is no need to change the DISPLAY variable or specify the "X11 Location."
Note: PuTTY stores configuration settings for each server separately. If, for example, you enable X11 Forarding for
login.kraken.nics.tennessee.edu, it will not change the setting for