Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

spotlite

macrumors newbie
Original poster
Jan 28, 2008
18
0
I have just recently decided to learn ObjC and Mac programming. The application I am developing needs to connect through SSH to a box running Fedora in order to run some bins on it, and get the output data, for data processing on the local (Mac) machine. What's the best way to accomplish this? Should I somehow interface Apple's Terminal Application? Is that possible? Or can I make my application SSH to the given server, run commands on it and retrieve data? If so, what libraries or frameworks do I use? Thank you in advance for all your comments.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Use NSTask to run the built in ssh command line tool.

Note this is not using the Terminal application: it will work even if Terminal is deleted. But the ssh command is the same as if you typed ssh at the command line.

You may find the NSTask page at cocoadev useful.
 

spotlite

macrumors newbie
Original poster
Jan 28, 2008
18
0
Thanks much! I tried to write some quick code using NSTask and I kept getting errors, then I read the link your provided me with and everything works perfectly now. Thank you once again.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.