I need to connect via TCP to a port that's behind a firewall, accessible through an SSH tunnel. I can achieve connection by opening a tunnel and hittting that port, but I want to build this tunneling in to my application.
Additionally, I want to be able to provide automatic login by use of having authorized keys on the server
This must work on the following platforms (in order of importance)
What's the easy way to do this? I don't want to spend a great deal of effort obviously since this isn't the meat of my application. But I'll reuse it so I may care enough to "do things right"
Set up SSH Tunneling in WindowsLaunch Putty and enter the SSH server IP Address in the Host name (or IP address) field. Under the Connection menu, expand SSH and select Tunnels . Check the Local radio button to setup local, Remote for remote, and Dynamic for dynamic port forwarding.
But libssh2 is BSD-licensed and appears to have the functionality needed
Looks like: libssh2_channel_direct_tcpip_ex will be the call
Note that the LGPL'd libssh is a problem because on iOS apps you MUST statically link and CANNOT dynamically link to libraries. Therefore, using an LGPL'd library means my source becomes open source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With