T
T
The-TS2021-08-19 14:09:14
Python
The-TS, 2021-08-19 14:09:14

How to open ssh tunnel in python?

Hey!
I need this scheme:

There is a server on the local computer (localhost:65535) and a remote host (123.123.123.123), how to direct localhost:65535 to 123.123.123.123:8080?
Here is the autossh equivalent:

autossh -M 20110 -o ServerAliveInterval=20 -R 8080:localhost:65535 [email protected]


How to do it in Python?
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vindicar, 2021-08-19
@Pyhon3x

Look towards Parallel-SSH , specifically the NativeTunnel sub-module . But as far as I understand, tunnels are always a hassle.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question