2

I use RealVNC to remote-control my computer while on the go. But it annoys me that I have to type the access password each time. Is it possible to make RealVNC (Or any other VNC implementation) work with my keypair instead of a password?

2

One simple method that I regularly use when access a Linux VNC server is to just setup VNC to not require a password at all. But I also set it to only listen for connections on the loopback interface (127.0.0.1).

Then I simply create an SSH tunnel to my box and use the SSH port forwarding for the authentication and remote access.

  • I think this is the way I'll do it. Can you give a bit more details about the setup, like the name of the program, or any other important details? I've never set up a tunnel before. – Ram Rachum Sep 8 '11 at 12:41
  • What OS are you using on the client and server? – Zoredache Sep 8 '11 at 15:13
  • Windows XP on both. – Ram Rachum Sep 8 '11 at 23:00
1

If you pay for the Enterprise edition, presuming all your machines are in a domain, you can have RealVNC use your current login credentials instead of a separate user name and password using the single sign-on option.

From the docs:

Single sign on

The Single sign-on authentication mechanism extends system authentication to automatically authenticate a connecting user to any instance of VNC Server on any host computer using the credentials initially supplied to log on to the client computer. For this to work, all host computers must be on a domain, and all instances of VNC Server must have Single sign-on specified. Note this feature is not available for VNC Viewer for Java; web browser users must always supply a user name and password in order to connect.

  • Not really what I'm looking for. – Ram Rachum Sep 6 '11 at 17:29
0

Tigervnc has an option to pass the passwd file from the server. Thus copying that file from the server on the client (using ssh with keypair) allows to log in without the need to enter a password:

scp host:.vnc/passwd ~/.vnc/passwd.host vncviewer passwd=~/.vnc/passwd.host host:5901

The documentation mentions --passwd but with version 1.9.0only the passwd version works.

Unlike the no password, only local access solution, this prevents other users on the same host to connect to the vncserver. It can however be combined with the local access only, to restrict who can try to brute-force the vncserver.

Note1: The documentation says the file needs to be on the same filesystem, but copying worked for me. Not sure whether the passwd file is ever changed and needs to be copied again. - from my observation this does not seem to be the case.

Note2: This is not really a key pair, as it seems to be a hash of the password stored on both sides.

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.