Categories: Connect & Login
Print this article
Automatic forwarding of the X11 display to a remote computer is possible with the use of SSH and a local X server. To set up automatic X11 forwarding within SSH, you can do (1) of the following:
- Invoke ssh on the command line with:
$ ssh -X hostname
Note that use of the
-xoption (lowercase) will disable X11 forwarding.
- Edit (or create) your
$HOME/.ssh/configfile to include the following line:
All X11 data will go through an encrypted channel. The
$DISPLAY environment variable set by SSH will point to the remote machine with a port 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 an encrypted channel. The connection to the real X server will be made from the local machine.
$DISPLAYenvironment variable for X11 forwarding; a non-encrypted channel may be used in this case.