0

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:127.0.0.1:5901 -C -N -l testmachine_1 172.1.1.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:127.0.0.1:5901 -C -N -l testmachine_2 172.1.1.1
testmachine_2@172.1.1.1's password: 

Could someone let me know the possible reasons for it?

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

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.

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.