[EN] Access your raspberry pi SSH anywhere

If you want to access your Raspberry PI SSH remote without the public IP address, I have a basic solution for you.

  1. First, you need to register at https://ngrok.com/. Login and in the Auth tab, get your Auth token and save it.
  2. Download ngrok to your PI -> https://ngrok.com/download
  3. Unzip it (probably at your Downloads folder)
$ unzip ngrok.zip4, Now we need to set a cron to start ngrok at boot
$ sudo crontab -e

And at the end of file add this:

@reboot sleep 60 && cd /home/pi/Downloads && ./ngrok tcp 22 -authtoken=Your\_Tokken 2>&1 >> /home/pi/reboot.log

Press CTRL + O, ENTER, CTRL + X.

5, Now reboot with:

$ sudo reboot6, If everything is setup okay, you can go to ngrok.com to show your SSH address and status of PI.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s