I'm following this guide to setup VNC on my DigitalOcean droplet.

Everything works fine up to step 3. When I try to create an SSH connection on my local computer using ssh -L 5901: -C -N -l sammy your_server_ip in my terminal, nothing happens: terminal screenshot

I'm using Linux mint 19.01
Droplet is Ubuntu 18.04

  • ehm... You now have the tunnel running. The guide says "Once the tunnel is running, use a VNC client to connect to localhost:5901. " So, what happens if you start (for example in a second terminal) vncviewer – Ljm Dullaart Apr 7 at 15:01
  • @LjmDullaart link – Yapartase Apr 7 at 15:17
  • Please answer questions in comments by improving you initial post... – xenoid Apr 7 at 15:19
  • @LjmDullaart I got it to work by installing and using vncviewer instead of gvncviewer. thanks! – Yapartase Apr 7 at 15:22

In this step, you set-up a tunnel. When you start-up ssh in tunnel-mode, it will just run in tunnel-mode, providing no additional output.

After this step, you can start:


to get a connection.

Note that the 5901 is the port number that you used to set-up your tunnel. The syntax for gvncviewer is different; the part in the command-line after the : there is used to specify the display, not the port number as far as I can tell (I don't use gvncviewer)


worked after installing vncviewer and running vncviewer localhost:5901


The -N option will disable the shell. man ssh:

-N      Do not execute a remote command.  This is useful for just forwarding ports.

The digitalocean guide:

while the -N switch tells ssh that we don't want to execute a remote command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.