ewpa / LibSSH-ESP32

Libssh SSH client & server port to ESP32 Arduino library
https://www.ewan.cc/node/157
Other
257 stars 36 forks source link

SSH tunnel #10

Open djamps opened 3 years ago

djamps commented 3 years ago

I browsed the code and I'm thinking this is a long shot, but I had to ask anyways. Is it possible for the SSH client to establish a tunnel such as the following command on *nix:

ssh -L 8000:1.2.3.4:8000 USER@1.2.3.4

Basically I'm trying to port forward to a public SSH server and avoid using 3rd party services like ngrok that require a 2nd local device.

ewpa commented 3 years ago

Does ssh_channel_open_forward() do what you need? Could you try it? Upstream documentation is here: https://api.libssh.org/stable/group__libssh__channel.html#gae86b0704a1f2bdebb268b55567f7f47b