How to access VNCServer using VNCViewer and SSH/PuTTY to access my Raspberry Pi over port 22 (instead of VNCServer’s port 5900). This requires that VNC Server was setup on the Raspberry Pi, VNC Viewer was installed on your local machine and port forwarding was previously sertup.

Download PuTTY:

Launch PuTTY

Enter a Host Name (Your IP address or Domain Name)

Click on SSH then X11 and Enable X11 Forwarding

Click on Session and Save

Connect to the server.

Start your VNCServer:

Note the ‘hostname:# (username)’

Then kill that VNCServer:
“vncserver -kill :#”
Yours is probably:
vncserver -kill :1″

CD into the .VNC directory:
“CD ~/.vnc/”

Create an ‘xstartup’ text file:
“sudo nano xtsartup’

Paste this in:
“# Uncomment the following two lines for normal desktop:
exec /etc/X11/xinit/xinitrc”

Restart VNC Server:

Go back to PuTTY

Load your saved server settings

Go to SSH-Tunnels

Source Port: “5900”
Destination: “hostname:590+server number”
Mine was “gatewaypi51:5901”

Click Add

Click on Session and Save

Connect to your server

Open up VNCViewer

Have VNCVierwer access server “localhost”


Further Documentation:


Putty (for SSH into the RasbperryPi):

Raspberry Pi 3:

32 GB Micro SD Card:

2.5 amp USB-Micro Charger:

Raspberry Pi 3 Case:

10/100/1000 USB Ethernet Adapter: