VNC is considered to be an insecure protocol. The password is sent using fairly weak encryption, and the rest of the session is not encrypted at all. For that reason, when using VNC over an untrusted network or internet, I recommend you tunnel it over SSH.
To forward VNC port 5900 on localhost to remote host port 5900
ssh -L 5900:localhost:5900 vncserver
If your ssh server is listening on other port like: 222
ssh -L 5900:localhost:5900 vncserver -p 222
The same procedure can be done on a window$ machine using putty
1-Start putty and go to Session category enter the ip address and port number of the ssh server
2- Next go to SSH->Tunnels and enter the localhost port number “5901” and the destination ip address and remote port number “5900.” Finally click add.
3- Give a name to the session, click save, and click open
4- Once you got the tunnel stablished, open vncviewer and enter localhost followed by the display number