Enable X11 Forwarding
There are a few changes needed on the virtual machine to enable X11 forwarding. In this tutorial we use Ubuntu 18.04 or above. Other Linux distributions will have a very similar SSH daemon configuration. The SSH daemon configuration file is located at
- Open the SSH daemon configuration file.
$ sudo vi /etc/ssh/sshd_config
- Locate and uncomment or change line
X11Forwarding yes. This line allows the graphical application to be forwarded over to your computer.
- Restart SSH daemon.
$ service sshd restart
- Install the graphical application
xclockfor testing. For Ubuntu or Debian,
xclockis included in the
x11-appspackage, and can be installed as follows:
$ apt -y install x11-apps
For RHEL, CentOS and Fedora, the package name is
xorg-x11-appsand you should install it using either
dnf, depending on the distro.