Compiling OpenSSH for iPhone?

I am trying to (cross-compile) compile obfuscated-openssh for iPhone, and I am having some problems. I use this to configure the assembly:

./configure --host=arm-apple-darwin CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1 \ CFLAGS="-arch armv6 -pipe -std=c99 -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/usr/include \ -L/Users/ben/iphonelib -Wno-trigraphs -fpascal-strings -fasm-blocks -O0 -Wreturn-type \ -Wunused-variable -fmessage-length=0 -fvisibility=hidden \ -miphoneos-version-min=2.0 -gdwarf-2 -mthumb \ -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk" \ CPP=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/cpp \ AR=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/ar 

This does not work, but complains that many header files could not be found, including netinet/in_systm.h and openssl/bn.h Anyone have any ideas on how to complete the build?

+6
iphone openssh cross-compiling
source share
3 answers

in_systm.h not available on iPhone. It defines only a few types, and the other parts that it includes are available. That way, you can simply copy the Mac header version into the assembly tree and point to it. ("locate in_systm.h" is a good way to find such things.)

It is possible that you have encountered many other problems, such as, but how to handle in_systm.h .

+8
source share

Openssh depends on the openssl libraries. You will probably need to create this first.

Recently, I had to add ssh support to the embedded system and use Dropbear . It was much easier to get up and work than to open. This gave us support for scp, ssh and sshd with the 300k executable. Presumably for ssh only you can get it up to ~ 110K.

+2
source share

There is a repository available from Cydia (and from apt) where OpenSSH is available: Telesphoreo . Know the command ported to the OpenSSH server, which means that they modified the source code to make it compile on the target platform.

+1
source share

All Articles