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 give an example of a simple code creates a tunnel.
Thanks in advance!
At work we usually create ssh tunnels forwarding ports. The way we do that is, by using the standard command ssh -L port:addr:port addr
with subprocess running in a separate thread.
I found this useful link: https://github.com/paramiko/paramiko/blob/master/demos/forward.py with an example of doing port forwarding with paramiko.