SSH Connect to Mac using iPhone SDK for Remote Login
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 conn开发者_StackOverflow中文版ection in an iOS4 Application. Does anybody know the code to do this?
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.
We are working on one iPhone application on which we need to use SSH integration using libssh2. We can connect remote server through password, but we can't get how to connect the remote server having authentication as privateKey as remote server having private key and public key authentication. Actually we want to connect Amazon EC2 instance using key authentication.
So can you please provide us some more details how to connect it? Also it would be better if you will provide us any sample source code, so we can get better understanding. We can connect the AWS instance via MAC terminal using below command.
ssh -i (keyFilePath) username@(domainname or IP)
But unfortunately, we can't connect using Xcode.
精彩评论