0

Is it possible, and how would I go about, removing the password from TightVNCServer on Raspbian?

I would like to run it without a password as I only access over LAN, and I am the only user, so I have no need for a password and its a pain in the backside putting it in every time.

Thanks Jon

0

One way is to create a password file and use it (One time configuration).

Step 1 - (only if you do not have tightvncserver) - Install tightvncserver

  • sudo apt-get install tightvncserver

Step 2 - Create a password file using vncpasswd command

$ vncpasswd
Using password file /home/user/.vnc/passwd
VNC directory /home/user/.vnc does not exist, creating.
Password: [TYPE YOUR VNC PASSWORD HERE]
Verify: [TYPE YOUR VNC PASSWORD HERE]
Would you like to enter a view-only password (y/n)? n

Step 3 - Connect using vncviewer, this time using password file -

$ vncviewer remotehost.com -p ~/.vnc/passwd

Step 4 - Create an alias so that you do not have to type command all the time -

  • Edit ~/.bashrc file

    $sudo nano ~/.bashrc

  • Add this line to end of file

    alias connect_pi_vnc="vncviewer remoteaddress:port -passwd ~/.vnc/passwd"

  • Reload profile ~/.bashrc

    $source ~/.bashrc

Step 5 - Now you can connect to your raspberry without password -

$connect_pi_vnc

And there you go!! You can access pi without typing a password and a long command.

  • thanks. will try it later, but looks good. – Jon Aug 16 '16 at 8:25
  • Just realised this is for a connection from a linux machine - I am connecting from a Windows machine – Jon Aug 16 '16 at 12:04
  • You can use the same tools with windows. You can use this command to create alias on windows : doskey connect_pi_vn="vncviewer remotehost.com -p path_to_passwd_file" – Tanuj Wagh Aug 17 '16 at 6:44
0

There may be a way of setting a null password, but I suggest you create a public key, and install in your Pi.

cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

There are many ways to generate keys, depending on platform.

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.