Have you ever wished that you had a GUI on a remote Linux server without using VNC? Actually you can use GNOME or any other GDM on a remote server via SSH, yep I’m not joking.
You need to have SSH and X11 running on both the client and the server. In addition on the server GNOME should be installed and SSH daemon should be running.
Step 1 – Turn on X11 forwarding on the server:
Add the following if it doesn’t exist or just change no to yes in
/etc/ssh/ssh_config and save it.
Add the following if it doesn’t exist or just change to yes in
/etc/ssh/sshd_config and save it.
Step 2 – Connect to the remote server viw SSH with X11 forwarding
In order to enable X11 forwarding when you connect to a remote server via SSH you need to provide the commandline option
-X. See the example bellow.
$ ssh -X username@server
Step 3 – Start GNOME Session
You need to start the GNOME session for the GUI to show. By default GNOME session is not started for remote connections. It might take a while for any change to appear, you should notice GNOME startup sequence appearing in the client and couple of messages in your terminal.
However I do not recommend running X11 or GNOME on a production server, but this should be handy if you want to connect to your home computer from office for example.