Dropbear for iPhone
xaos
xaos at darksmile.net
Wed Aug 25 09:06:36 WST 2010
Hello everyone. This is what I'd like to do:
In my iPhone app, I'd like to call the Dropbear client code in order to create an SSH tunnel
to another machine. I do not want an independent ssh command-line client.
I will be running the client code from an iPhone thread.
I do not want X11 forwarding or SSH compression.
Easier said than done. I guess.
Quick info about myself: I am a serious developer who knows a few things about iPhone,
Objective-C, C programming and UNIX. Been with UNIX since '84. Yes, I'm, old(er).
So, I don't need hand holding here, just a few pointers to get me going. Naturally, I will post
my results as I tend to do, see my blog at: http://www.xm5design.com/
Ok. So my initial code inspection turned out the following:
in "cli-main.c" there is a way to start the code without a "main()" which would clash with the
"main()" in any iPhone app.
This is good!
However, the defines: "DBMULTI_dbclient" and "DROPBEAR_MULTI" are not
exactly clear on their meaning.
There is a "cli_dropbear_exit" function that seems to be the central exit gate for the client code.
If true, this is fantastic since I don't want to Dropbear code to "exit()". I want a nice "return()"
which will shutdown the dropbear thread gracefully (or re-start).
Problem: I can't really use the Makefile genned by configure since I will execute the code
from Xcode. Any hints?
I tried a simple test on my OSX machine like this:
./configure --disable-zlib --disable-syslog --disable-lastlog
and then:
make PROGRAMS="dbclient" >make.log 2>&1
and I got a working client binary. I was able to ssh to another machine, etc, etc..
However when I do: "otool -L dbclient" (otool is like like ldd)
I only see "/usr/lib/libSystem.B.dylib" no other lib. Does that mean
I don't need the libraries in "libtomcrypt" and "libtommath" for a simple client code?
Please accept my thanks ahead of time for this. Any help is appreciated.
-George H.
More information about the Dropbear
mailing list