Remote Linux desktop on your VPS with SSH and VNC
While you usually connect to your VPS via a terminal, you can also connect to a remote Linux desktop via SSH or VNC to run desktop GUI apps. There are a number of ways to get this done, from running single commands via X11 forwarding and
ssh, to forwarding an entire desktop, to using VNC. In this tutorial, we’ll cover how to do each of these so that you can choose the application that works best for your needs. Note: We can’t guarantee these operations will be particularly fast—primarily due to latency between your machine and your VPS—but it could come in handy every once in awhile.
- A VPS running any of our available OS options.
- A non-root user account (commands requiring escalated privileges will use
- A local machine running Linux, an OS X machine with XQuartz installed, or a Windows machine with Xming installed—this tutorial depends on having some type of X server running locally.
-Xoption, which enables X forwarding, and the
-Coption, which enables data compression.
Once into the VPS, you should first install the
ssh -XC [email protected]
sudo apt install xauth # Debian/Ubuntu sudo yum install xorg-x11-xauth # CentOS
/etc/ssh/sshd_configwith your favorite editor and look for the
X11Forwardingoption. This line should be uncommented and be changed to
X11Forwarding yes. After that, you should restart.... Read More