Default X11 forwarding with ssh
Probably everybody knows what the function of ssh is and what you can do with it.
If you have a server in a controlled room, normally it’s running in runlevel 3 (this is full multi user mode with networking without X Windows). If you want to make changes to the system through Yast for example, you could go to the control room, power on the monitor and start X by giving the command startx, make your changes and close X.
Another solution is to make a remote connection through ssh (ssh user@servername) and start Yast. Normally this is pure text mode. So if you start yast2 (graphical Yast) the normal yast is started because the graphical output cannot be transferred through the ssh connection.
It’s possible to forward the X output through the ssh connection by giving the option -X (ssh user@servername -X).
If you want the X forwarding by default you can arrange this in the configuration file for ssh in /etc/ssh/ssh_config. Remove the # before ForwardX11 and change the no to yes.
Now the X forwarding option is always enabled by default.
About Michael
Michael Wilmsen is a experienced VMware Architect with more than 20 years in the IT industry. Main focus is VMware vSphere, Horizon View and Hyper Converged with a deep interest into performance and architecture.
Michael is VCDX 210 certified, has been rewarded with the vExpert title from 2011, Nutanix Tech Champion and a Nutanix Platform Professional.