Reputation: 1099
I have an app that needs to run a command in the terminal. or i want to run this command in my app.
ssh -N -p 24 -g -D 1080 username@server
plz help me . tnx
Upvotes: 0
Views: 1017
Reputation: 32346
You've marked this question as iphone
and iphone-sdk
, but it's not possible to fork
or exec
in an App Store application. If you need SSH connectivity for your application, you can use a library like libssh2, but you won't be able to reuse the standard ssh
command.
Upvotes: 4
Reputation: 168
Try ssh keys. Check out ssh-keygen for more information. Simply generate a key for yourself, put the public key (usually ~/.ssh/id_rsa.pub) in a file called ~/.ssh/authorized_keys on the box you want to ssh into, and voila, it should just work :)
Upvotes: 3