ParallelSSH / parallel-ssh

Asynchronous parallel SSH client library.
https://parallel-ssh.org
GNU Lesser General Public License v2.1
1.2k stars 148 forks source link

Local to remote port forwarding for Sish/Ngrok alternative #373

Closed kwuite closed 1 month ago

kwuite commented 1 year ago

Is your feature request related to a problem? Please describe. I have setup an Ngrok alternative server with sish that uses local to remote port forwarding and creates on-the-fly dns access via a wildcard certificate on the remote server.

This works really nice for showing customers my work or access on demand CI servers by dns for problem solving. Now I want to be able with python to natively (no exec with openssh) setup port forwarding channels and acquire a https host at the remote server.

The call you can make with sish is equivalent to: ssh -R hereiam:80:localhost:8080 ssi.sh and would generate a dns called hereiam.ssi.sh (I have my own server, this domain no longer works).

Describe the solution you'd like Is it possible with this library to use the -R argument remote forwarding logic?

Describe alternatives you've considered I tried tunnelssh and paramiko but their -R and -L argument only support exact IP:PORT syntax.

Additional context Is this at all possible to do with Python or maybe another language? Would love to hear some input cause I've been searching for days now. Thanks for the support.

I can send server credentials for testing if anyone likes to help, I locally work with:

sshpass -p <here_should_be_a_password> ssh -o "VerifyHostKeyDNS yes" -o "StrictHostKeyChecking no" -o "PubkeyAuthentication=no" -v -p 2222 -R test:80:localhost:8080 dynamic.kelvin.id
kwuite commented 1 month ago

Nobody is responding.