Okay so I'm fairly new to SSH Tunneling, VPN, VNC, all that good stuff. *NOOB ALERT*

I recently bought a Raspberry Pi and I loaded the Raspberry Pi release of Kali Linux on it. I have tried all day and with little success to connect VNC over a reverse SSH tunnel. After some research, I found that it might be worthwhile just to try VPN instead of SSH tunneling. Are there any benefits or drawbacks to using VNC over VPN as opposed to SSH? Which is more secure? Better yet, which method is more anonymous?

Here is what I am trying to do: The Pi sits behind a NAT Router. I have a server with a known static I.P. that I can connect to from the Pi. Then I have a laptop, also behind a NAT, that I can connect to the server with. It all looks somewhat like this:

Laptop --> |NAT| --> Server <-- |NAT| <-- Pi

I can ssh into the server from the Pi by issuing the following command:

ssh -R 4040:localhost:22 Server_user@Server_hostname

This connects to the server and tells it to listen for any connections to port 4040 on the server.

I can then reverse SHH directly into the Pi from my laptop with the following command:

ssh Pi_user@Server_hostname -p 4040

I was successful in connecting from my laptop to my Pi over SSH. However, I have tried time and time again to connect the VNC client on my laptop to my VNC server running on the Pi, but it has been unsuccessful. I am able to get it working when I remote SSH directly from my Pi to my laptop using port forwarding through SSH, but I can't figure it out when I'm connected through the server.

Should I even try to get SSH tunneling working, or would it be easier (and more beneficial) to use VPN, if I want to connect through a server?

  • I would add -X to the ssh connect command. This will allow you to run the x applications on your local system, while using the non-gui applications with best speed. Dec 26, 2014 at 6:34
  • So without using vpn or vnc. Dec 26, 2014 at 6:34


You must log in to answer this question.

Browse other questions tagged .