I'm currently starting a project using multiple Raspberry Pis. I have a system already in place where if the code fails, open an ssh tunnel on port 22. However, if two or more Raspberry Pis fail only one can open a tunnel on port 22 (tcp) in region 'au'. to access it via ssh
def ssh():
ngrok.set_auth_token("MY_SECRET_TOKEN")
conf.get_default().region = 'au'
ssh = ngrok.connect(22, "tcp")
ngrok_process = ngrok.get_ngrok_process()
try:
ngrok_process.proc.wait()
except KeyboardInterrupt:
ngrok.kill
I've been in touch with the support from Ngrok and they mentioned it is possible to have more than one tunnel on port 22 (tcp).
On a free plan you can only have one open ngrok "session" but you can run up to 4 tunnels through that one session. All of your tunnels could be to port 22, that would work fine. - Ngrok Support
and Possibly referring to having different port tunnels (22, 80)
yes you can open multiple tunnels in the "au" region within one session
Currently getting this error:
Traceback (most recent call last):
File "/home/pi/main.py", line 210, in <module>
ssh()
File "/home/pi/main.py", line 30, in ssh
ssh = ngrok.connect(22, "tcp")
File "/usr/local/lib/python3.7/dist-packages/pyngrok/ngrok.py", line 245, in connect
api_url = get_ngrok_process(pyngrok_config).api_url
File "/usr/local/lib/python3.7/dist-packages/pyngrok/ngrok.py", line 162, in get_ngrok_process
return process.get_process(pyngrok_config)
File "/usr/local/lib/python3.7/dist-packages/pyngrok/process.py", line 295, in get_process
return _start_process(pyngrok_config)
File "/usr/local/lib/python3.7/dist-packages/pyngrok/process.py", line 465, in _start_process
ngrok_process.startup_error)
pyngrok.exception.PyngrokNgrokError: The ngrok process errored on start: Your account is limited to 1 simultaneous ngrok client session.\nActive ngrok client sessions in region 'au':\n - ts_1opHl3G90CmgGPiP6JM0IUpcXZM (IP)\r\n\r\nERR_NGROK_108\r\n.
Is it possible to have multiple ngrok.connect(22, "tcp")
tunnels with the region 'AU' open in one session?