Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reverse Port Forward using libssh2 on iOS

I'm looking for some example code of a reverse port forward on iOS using libssh2. Here's a close example:

Example code of libssh2 being used for port forwarding

But I'd like it to be tailored to iOS and objective-C if possible. Straight C is fine too. I'm wary of the socket and FD code, and would rather have a robust solution than the one I'm hacking up. I've tried RTFMing libssh2 for a while, but it ends up being just RTF Code... and I'm not confident enough in my C code to do this networking part.

EDIT: bounty for a working implementation of ssh with port forwarding on iOS 4.3 (e.g. iphone4, ipad2), doesn't need to be libssh2 in specific.

like image 457
Ralphleon Avatar asked Aug 10 '11 19:08

Ralphleon


1 Answers

As it turns out, it's fairly straightforward to migrate the putty source http://www.chiark.greenend.org.uk/~sgtatham/putty/ to ios ...

like image 156
Foo Bah Avatar answered Nov 10 '22 14:11

Foo Bah