Fly for free with Gadling and Southwest Airlines

ssh on iPhone

Over at the #iphone channel at irc.osx86.hu, the thoroughly awesome NerveGas has figured out how to enable ssh on the iPhone without using restore mode. The secret lies in overwriting an existing binary and plist to trick the iPhone into calling chmod on the Dropbear ssh server and making it executable.

At this time, NerveGas has used Nightwatch's compiler to create iPhone-compatible versions of curl and ps as well as a number of other useful Unix utilities. (He's working on grep, as I write).

So what does this mean? Well, once you've got ssh installed on your iPhone and active, you can access your iPhone from a shell on your Mac. You can send and retrieve files using scp or sftp. And you can use the compilation toolchain to build other Unix utils or even your own software. It's just a short matter of time until perl and other command-line utilities are iPhone-ready.

Quick Reference

How To. You'll find NerveGas's excellent how-to here.

Necessary files. ssh kit and binaries (with many of the Unix utilities compiled for you).

NightWatch's Binary kit. Download here.

Other utilities. You can download curl, chmod, ps, ifconfig, grep, ed, vim, netcat. You can also find a compilation binkit here.

How do I ssh from my Mac? Look up the IP address under your WiFi settings (click the blue right arrow next to the WiFi network you choose). Then from the Mac's terminal, enter ssh root@IP address and use dottie as your password.

How do I get these to execute. Use /bin/chmod until you can get a shell going. For example, /bin/chmod 555 /bin/ls.

How do I enable scp and sftp? Use NiteWatch's binary kit. Make sure to install all the items in the /usr/tree including the /usr/lib files, otherwise you'll get an error when attempting to run the sftp-server.

How do I get a path to work? Run a shell, like csh, and use the path commands in the shell. I've set up a .cshrc to make things easier.

Where do I get the source for iPhoneInterface with getfile/putfile? The public svn, where you can pull the source, is here. You can grab the latest update to the main.cpp file here.

Thanks to NerveGas and also to pen-x for figuring out how to get Dropbear working and Nightwatch who got the entire compilation toolchain working, to iZsh, bricolage, and to BabyJesus.

Related Headlines

Reader Comments (Page 1 of 2)

| 1 | 2 |

TUAW Features

Mac 101 iPhone Around the Worldask-tuaw
Mac News
Macworld (497)
.Mac (38)
Accessories (624)
Airport (75)
Analysis / Opinion (1290)
Apple (1607)
Apple Corporate (546)
Apple Financial (185)
Apple History (38)
Apple Professional (49)
Apple TV (160)
Audio (441)
Bad Apple (119)
Beta Beat (146)
Blogging (87)
Bluetooth (15)
Bugs/Recalls (56)
Cult of Mac (868)
Deals (199)
Desktops (114)
Developer (204)
Education (93)
eMac (10)
Enterprise (126)
Features (372)
Freeware (362)
Gaming (344)
Graphic Design (16)
Hardware (1269)
Holidays (41)
Humor (585)
iBook (65)
iLife (237)
iMac (183)
Internet (304)
Internet Tools (1287)
iPhone (1341)
iPod Family (2017)
iTS (958)
iTunes (792)
iWork (18)
Leopard (355)
Mac mini (109)
Mac Pro (50)
MacBook (196)
MacBook Air (77)
Macbook Pro (214)
Multimedia (430)
Odds and ends (1414)
Open Source (270)
OS (889)
Peripherals (190)
Podcasting (181)
Podcasts (83)
Portables (195)
PowerBook (137)
PowerMac G5 (50)
Retail (571)
Retro Mac (47)
Rig of the Week (42)
Rumors (608)
Software (4206)
Software Update (393)
Steve Jobs (252)
Stocking Stuffers (55)
Surveys and Polls (96)
Switchers (111)
The Woz (34)
TUAW Business (227)
Universal Binary (281)
UNIX / BSD (61)
Video (908)
Weekend Review (74)
WIN Business (49)
Wireless (80)
XServe (35)
Mac Events
One More Thing (27)
Liveblog (0)
Other Events (231)
WWDC (180)
Mac Learning
Ask TUAW (96)
Blogs (85)
Books (23)
Books and Blogs (63)
Cool tools (444)
Hacks (462)
How-tos (480)
Interviews (33)
Mods (184)
Productivity (582)
Reviews (99)
Security (145)
Terminal Tips (56)
Tips and tricks (558)
Troubleshooting (160)
TUAW Features
iPhone 101 (23)
TUAW Labs (3)
Blast From the Past (17)
TUAW Tips (141)
Flickr Find (32)
Found Footage (70)
Mac 101 (80)
TUAW Interview (30)
Widget Watch (196)
The Daily Best (2)
TUAW Faceoff (4)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Sponsored Links

The Unofficial Apple Weblog (TUAW) bloggers (30 days)

#BloggerPostsCmts
1Cory Bohon455
2Dave Caolo430
3Mat Lu324
4Michael Rose2919
5Scott McNulty281
6Erica Sadun280
7Brett Terpstra220
8Mike Schramm184
9Robert Palmer1019
10Steven Sande97
11Christina Warren617
12Joshua Ellis64
13Nik Fletcher21
14Chris Ullrich21
15Jason Clarke11
16Lisa Hoover11
17Victor Agreda, Jr.13

Featured Galleries

Macworld 2008 Keynote
Macworld 2008 Build-up
Macworld Expo 2007 show floor
The Macworld Faithful in Line
iPhone First Look
iPhone 2.0 - .Mac push e-mail
iMac 1998
TUAW Faceoff: Screenshot apps on the firing line
Boston Apple Store (Boylston Street)

 

    Most Commented On (7 days)

    Recent Comments

    More Apple Analysis

    More from AOL Money and Finance

    Weblogs, Inc. Network

    Other Weblogs Inc. Network blogs you might be interested in: