Skip to content

Remote connection to Raspberry Pi by ngrok

  • by

How to make it possible to connect remotely to Raspberry Pi, even to the internal IP and behind the firewall?

  1. Create ngrok account (https://ngrok.com)
  2. Download and unpack application on our Raspberry:
    curl -O https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip
    unzip ngrok-stable-linux-arm.zip
  3. From Auth tab (https://dashboard.ngrok.com/auth/your-authtoken) copy command for config auth token.
    ./ngrok authtoken {token}
  4. Add to cron start ngrok on system boot.
    crontab -e
    @reboot {path_to_ngrok} tcp 22 &
  5. That’s all! Our Raspberry is configured, to check current port go to status tab on ngrok panel (https://dashboard.ngrok.com/status/tunnels). 
Widoczność połączenia w panelu ngrok.

6. To connect over ssh use command:
ssh [email protected] -p 10370

Comments:

– After reboot (on free account) a new port will be assigned.

Leave a Reply

Your email address will not be published. Required fields are marked *