views:

101

answers:

1

I wonder if anyone has succeeded in connecting to a Mac using an iOS Device via SSH (Remote Login) to access terminal and execute commands. I know that this is definietly possible as the Mobile Terminal App accomplishes this perfectly. I am trying to implement this connection in an iOS4 Application. Does anybody know the code to do this?

A: 

MobileTerminal.app is a terminal emulator which just calls OpenBSD's OpenSSH. Unfortunately, you cannot do this, because it requires fork(), and one of the things the sandbox disallows is fork(). The easiest way to do it would be to just take the OpenSSH source and slap a CocoaTouch GUI on it.

Mentalikryst
Emulating a proper terminal is a giant pain; that's where most of the work will be.
rpetrich
@Mentalikryst: Thanks. I think theres a way to do this and keep Apple happy because theres an iOS App in the App Store that allows you to do this. iSSH. I just want to have my App connect to a Mac provided that they input the username, host and the password of course. Then I just want to send one command to the Mac and thats it. I wonder how I can get around to implementing the OpenSSH source to a CocoaTouch GUI. I will work on that. Thanks. Any other possibilities? Any sample codes would be highly appreciated.
iiyanx7