How to make it possible to connect remotely to Raspberry Pi, even to the internal IP and behind the firewall?
- Create ngrok account (https://ngrok.com)
- 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
- From Auth tab (https://dashboard.ngrok.com/auth/your-authtoken) copy command for config auth token.
./ngrok authtoken {token}
- Add to cron start ngrok on system boot.
crontab -e
@reboot {path_to_ngrok} tcp 22 &
- That’s all! Our Raspberry is configured, to check current port go to status tab on ngrok panel (https://dashboard.ngrok.com/status/tunnels).
6. To connect over ssh use command:ssh [email protected] -p 10370
Comments:
– After reboot (on free account) a new port will be assigned.