Friday, July 19, 2019

VNC Tunnel through SSH PuTTY

[EDIT: this setup is working well for me.  Use at your own risk.  Sorry I can not offer individual IT support.]


ROUTER SETUP (ASUS RT-AC68U)

WAN > virtual server/port forwarding >
Service name: ssh
Source IP: blank
Port range: 922 (not opening 22 on purpose)
Local IP: server IP
TCP

SERVER SETUP (Linux Mint or Ubuntu 18.4 tested)
Install x11vnc and openssh-server
$ sudo apt-get install x11vnc openssh-server
Create vnc.sh
$ sudo nano vnc.sh
x11vnc -safer -localhost -nopw -once -display :0
change permission to executable

CLIENT SETUP (WINDOWS XP to 10 works)
Run PuTTY
Connection > SSH > remote command
./vnc.sh
Connection > SSH > Tunnels.
5902 for Source port
localhost:5900 for Destination
Add
Session of PuTTY
Host Name: MYIP OR URL
Port 922 (22 is default; do not use 22)
Save profile name 'abeto'
open
Once SSH tunnel is open, leave the PUTTY running
If case PuTTy hangs: putty -cleanup

run TightVNC Viewer
localhost::5902 or localhost:2 or 127.0.0.1:5902 works too
or you can run from DOS or batch file
putty.exe -load abeto -ssh username@serveripaddress -pw password
make sure the username exists on the server

PeopleSpace International