
Now I am on a computer in someone elses network. When I tried ssh’ing into port 2222 of my home server I was redirected to the Pi. Right after the Pi got an IP address it created a tunnel to my home server. It looks weird when you stare at it but put it behind a plant and nobody will ever notice it (except the guy who waters the plants). I have this plugged into an office somewhere. Here are pictures of it in its special case: Lastly was finding a black ethernet cable so both cables coming out of the power brick are black and look inconspicuous.

This way when I power up the brick, it’ll give power to the USB charger which will in turn power the Pi. Then I soldered where the powerbrick power feed is into the USB power feed. Took the plastic casing off to save space and cut the cord to save even more space. In order to do this I simply took apart a USB charger. I had to solder off the S-Video port to get it to fit just right. I found an old powerbrick for a laptop and gutted it. Once the tunnel is up, anyone who ssh’s into port 2222 of the linux server will then be redirected to the Pi. The tunnel it creates is really a reverse remote tunnel. When the Raspberri Pi is on, it will check every minute to see if an ssh connection to your linux server exists. Now let’s take a step back and look at what we’ve done.

To troubleshoot any problems in this you can view the tunnel.log file. Confused? Here look at this command you would issue from the Pi: Create a reverse remote ssh tunnel to that host to forward connections back to the Pi. So now you want to set it up so the authentication is certificate based (this way the Pi can be set up to auto ssh into the server without being prompted for a password).įollow this guide for setting up automatic ssh login using ssh keys. Setting up the ssh certificate on the Piįrom the Raspberry Pi you should be able to ssh to this linux server. All I’ve done is forwarded port 22 through the firewall to a linux server to make this work. Even though my home network gets a dynamic IP from my ISP it usually stays the same for weeks and even years. One that you can ssh into from anywhere in the world. What you’ll need is a linux server that has a persistent IP. Well you don’t know its IP and even if you did it is probably behind a firewall which makes it impossible to get to. With the above, you should be able ssh to the Pi remotely if you know its IP.
#Build ssh tunnel linux how to#
It should be easy enough to figure out how to complete these on your own.

This server should have a static public IP. A seperate linux server that is reachable by ssh from the internet.Raspberry Pi is configured to receive ssh connections.Raspberry Pi is configured to receive a DHCP address.Pre-configurationīefore beginning you need to have the following: I want it to be a plug in and run away type of scenario and not one that I’ll be hooking up any monitor or keyboard or anything.

I know my home’s IP but I don’t know the Pi’s IP. The problem is that if I plug this in somewhere in the world and leave it I need it to phone home so I can gain remote connectivity to it. Then if I could access it remotely I am in their network and can do things. The idea was to be able to plug it in somewhere and it be small enough that it’s not noticed in someone’s network. When I received my raspberry pi I immediately wanted to use it as a hacking remote tech support tool. What’s this? Just an ordinary powerbrick? Read on to find out why this is an incredibly dangerous thing to see in your office.
