4

I'm looking for a way to implement SSH Dynamic Port Forwarding ('ssh -D') under Python. The problem is that it has to work under Windows, i.e., running SSH with popen/pexec/etc. won't work. Any ideas?

cheers,

Bruno Nery.

Bruno Nery
  • 41
  • 2

2 Answers2

1

Have you tried Paramiko?

jathanism
  • 33,067
  • 9
  • 68
  • 86
  • 1
    Does Paramiko provides dynamic port forwarding? I didn't find any reference to it. – Bruno Nery Jun 29 '10 at 13:53
  • Paramiko does not support this. But you should add your use case to the issue on Github requesting this feature: https://github.com/paramiko/paramiko/issues/955 – Utkonos Jan 08 '19 at 22:03
1

There are ssh executables for Windows, so you can uses the subprocess.Popen approach. This is not exactly elegant, a pure Python approach would be better.

Mad Scientist
  • 18,090
  • 12
  • 83
  • 109
  • I don't like the idea of being dependent on another executable. Anyhow, if there is a DLL that does dynamic port forwarding, then we're talking :) – Bruno Nery Jun 29 '10 at 14:06