3

I want access a VNC Server running on a linux machine from windows client, without using any password. Is that possible?

1
  • He's probably running the VNC server on localhost and SSH tunneling to it.
    – devin
    May 12, 2016 at 17:43

3 Answers 3

1

If you just want to remote to a server, most modern distros now have an option, "remote desktop", which is just a polite way of saying "run a VNC server attached to the current X session". If you enable this, and as long as you stay logged in at the console, you'll be able to remote to the server.

I'm going to guess that you're really trying to say "I don't want the password dialog to appear, but I want to log into a Linux box remotely". This is doable, but it does require some setup, and you may encounter some conflicts on newer distros.

First, if you are after something that more-closely resembles a Citrix session (where each user has an individual remote desktop), you'll want to disable the option I mentioned above. If it's turned on, you'll end up with a port conflict.

Next, you'll want to install a VNC server that has session support. I would recommend TightVNC over the stock VNC package, not only because it has support for compression, but it also seems to "play better" when authenticating against display managers.

  • Red Hat/CentOS:
yum remove vnc && yum install tightvnc
  • Debian/Ubuntu:
apt-get update && apt-get remove vnc ; apt-get install tightvnc

You'll want to create a new entry for your inet superserver service (inetd, xinetd, etc.) The idea is that you will dynamically create a connection for each client attempt. You'll want this because using a daemon that runs statically will not properly spawn off a subprocess for each connection attempt.

The entry for the inetd/xinetd server will have display size, color depth, etc. embedded into it. I would recommend something like 15 or 16 bpp, and a display around 1000x700 (the remaining 68 pixels will be taken up by your windows/linux/mac client at the bottom and top of the client display, and you'll have 12 pixels of "edge" on each side on a 1024x768 setup). If you require custom displays, you can create multiple entries, each with their own bit depth and display resolution. Yes, you can do custom resolutions, and some clients even support custom bit depths (12bpp, try it sometime...) This will provide you with some flexibility when connecting from different clients.

Finally, you'll want to enable remote logins on your display manager. Most distros will bundle GDM as the default, although it could be KDM, WDM, XDM, etc. so you'll need to investigate this to set it correctly.

Some examples:

http://www.simonsmess.com/ubuntu/vnc-to-gdm-with-login-it-can-work/

http://www.realvnc.com/pipermail/vnc-list/2000-December/019151.html

http://themadadmin.com/wp/?p=1225

1

If you have tightvnc installed the default for the Xvnc is not to require a password, unless you specify a password file with -rfbauth <your_pass_word_file>.

On a CentOS 7.0 system, installing tightvnc with yum, did get me tigervnc something which is stupidly so close to tightvnc that I missed the different install the first time around. What is worse is that it functions in an incompatible way. Its Xvnc actually defaults to assuming a password, and you have to provide -SecurityTypes None as an argument when you start the server.

It makes perfect sense to not require a password, e.g. when you ssh into a system that is firewalled on the ports on which Xvnc is listening.

0

It depends on the VNC Server, but yes, the ones I've seen have an option whether to use a password or not. Question is: why on earth would you want anyone to be able to connect?

1
  • 1
    You can use a ssh tunnel which is far more secure than a vnc password.
    – dman
    Feb 12, 2020 at 1:33

You must log in to answer this question.