SSH gives a solution of remote command-line login and remote command execution on Unix-like operating system. If you want to run server’s software with GUI on your client however, unlike RFB (VNC) protocol, SSH itself is not applicable to windowing systems and applications at the framebuffer level. But we can enable SSH’s X11 forwarding function and launch GUI using a X Window System display server if needed.
First, we need to configure our server (CentOS 7) to make sure it allows X11 forwarding.
Edit configuration file
/etc/ssh/sshd_config, make sure the option
It will be quite easy if you are using a Linux system with GUI installed, which means you already have a X display at the local end. Simply add
-X option while using
$ ssh -X <username>@<hostname or IP address>
Then you can launch your GUI apps by command line.
If you are using a Microsoft Windows system, you need two programs installed before using, a SSH client and a X windows display server. Here I recommend two softwares, PuTTY and Xming.
Here is a quick-start:
- Install Xming, choose
Portable PuTTY Link SSH client - use with Portable PuTTYwhile selecting components.
- Launch Xming, choose
Start no client
- Launch SSH client and Enable X11 forwarding (Under category: SSH -> X11)
- Login and enjoy
This page gives a more detailed tutorial on Installing/Configuring PuTTy and Xming.