The terminal is a basic tool when working with Raspberry Pi, but accessing a Raspberry Pi from outside the local LAN requires port forwarding. This is a simple way to get a terminal in a web browser from anywhere!
Our goal is to be able to access the Raspberry Pi terminal from anywhere.
Unfortunately the version of Node.js shipped with the latest binary is pretty old. To download and install the latest version of Node please do the following:
ssh [email protected] curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - sudo apt-get install nodejs node --version [email protected]:~ $ node --version v6.9.2
Once you get the latest Node, you will need to use
npm to install
Installing beame-insta-ssl and getting a cert
pi@raspberrypi:~ $ npm install -g beame-insta-ssl
Then open a web browser and go to: https://ypxf72akb6onjvrq.ohkv8odznwh5jpwm.v1.p.beameio.net/insta-ssl
Pass the Captcha and prove you are not a bot, and you will get a token in your email. If you have already done this previously, go and get yourself a second set of credentials just for terminal. This is the simplest way to do it.
pi@raspberrypi:~ $ beame-insta-ssl create 'token from email'
The next step is to install
wetty We will install it with the
-g option to use it as a command. Check out
[email protected]:~ sudo npm install wetty -g
Wetty can be run as HTTP or as HTTPS. We can do either option to run it as HTTP:
pi@raspberrypi:~ wetty -p 8556 http on port 8556 pi@raspberrypi:~ $ beame-insta-ssl tunnel 8556 http Starting tunnel https://cgqjqvahrdurqwhi.v1.p.beameio.net -> http://localhost:8556