Linux Administration Cookbook
上QQ阅读APP看书,第一时间看更新

SSH and X11 forwarding

Not generally used these days, but still useful in some select situations, X11 forwarding is the act of running a program on a remote box, and displaying said program on your local machine.

You can set up your session using the following command:

[vagrant@centos1 ~]$ ssh centos2 -X
There are security implications of working with X11 forwarding. Consult your distribution's manual page for information around this, as the default behavior can differ from distribution to distribution.
Currently, this is only possible with X Window Manager setups, and the more modern Wayland display server protocol doesn't have a similar ability, due in part to wanting to keep things simple.