X11 Forwarding
Categories: Connect & Login
- Invoke ssh on the command line with:
$ ssh -X hostname
Note that use of the
-x
option (lowercase) will disable X11 forwarding. - Edit (or create) your
$HOME/.ssh/config
file to include the following line:ForwardX11 yes
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.
$DISPLAY
environment variable for X11 forwarding; a non-encrypted channel may be used in this case.