I followed this link https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-18-04

and I created the VNC server in my remote VM, started the VNC server in it and pointed to my local machine using the

Create an SSH connection on your local computer that securely forwards to the localhost connection for VNC. You can do this via the terminal on Linux or macOS with the following command:

    ssh -L 5901: -C -N -l testmachine_1

But when I point to my local machine it worked successfully. I am able to take the remote using VNC.

But when I login to some other machine and point the same remote machine to it, It failed to connect.

I am not able to see any error, It got stuck like this

/etc/test$ ssh -L 5901: -C -N -l testmachine_2
[email protected]'s password: 

Could someone let me know the possible reasons for it?

  • Try reverse SSH tunnel from the other machine. Nov 16, 2018 at 21:09
  • @petar could you send me the command, I will try it in other machine
    – Harry
    Nov 16, 2018 at 21:10

1 Answer 1


You are getting asked for the password because you are on a machine that does not have the login information stored yet. Put the password in for testmachine_2 on remote machine and press enter, this will unlock the keyring for the first connect on that machine. However I would suggest getting private and public keys working insted of passwords. If no password was set use that users login password.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .