I\'m learning python. I need to tunnel creators to read information from a database and close the tunnel. I use paramiko but I have not worked with tonelem example. please g
Might I suggest trying something like pyngrok
to programmatically manage an ngrok
tunnel for you? Full disclosure, I am the developer of it. SSH example here, but it's as easy as installing pyngrok
:
pip install pyngrok
and using it:
from pyngrok import ngrok
# "localhost:22">
ssh_tunnel = ngrok.connect(22, "tcp")