SSH Tunneling
Backgrounds
Now as you have set up vpn, you still cannot access to all servers at home via normal ssh or normal rdp or normal vnc.
You need to connect to the vpn server first, then access other servers at home.
Remmina
- Turn on your VPN.
- Create a new session, VNC protocol. Set up Basic settings normally.
- At SSH Tunnel tab, enable SSH Tunnel → Custom: ip:port → Authentication type: Password → Username and Password. Now you can connect.
Terminal
ssh -J username1@ip1 username2@ip2
# enter first user password then second
Android to VNC with SSH Tunnel: bVNC Free
- Turn on VPN.
- Connection Type: Secure VNC over SSH
- SSH Tunnel Settings
ip port(default:22)
username # later it will ask your password
- VNC Connection Settings
ip port(default:5900)
username
password #keep yes
Android to SSH with base SSH: JuiceSSH
- Turn on VPN.
- Basic settings
Type: SSH
Address: ip
Identity: username + password
- Advanced settings
Port: 22
Connect via: base ip
Notes
flowchart LR;
z[Wifi Router 192.168.1.1];
subgraph a[Laptop 192.168.1.112]
a1[port 6666]
end
subgraph b[Pi 192.168.1.111]
b1[port 5901]
b2[dns 192.168.4.1]
end
z-->a;
z-->b;
subgraph c[PC 192.168.4.73]
c1[port 5900]
end
a1 -->|ssh| b1;
b2 -->|provide internet| c;
b1 -->|ssh| c1;
# In Pi,
ssh -L 5901:localhost:5900 user1@192.168.4.73
# In Laptop
ssh -L 6666:localhost:5901 pi@192.168.1.111
# Try VNC Viewer localhost:6666
References
- SSH Local and Remote Port Forwarding with VNC