Different name, fashion's the same: Styledash is now the StyleList Blog!

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 1)

TUAW Features

back-to-school
Mac 101 ask-tuaw
Mac News
WWDC (251)
.Mac (66)
Accessories (654)
Airport (75)
Analysis / Opinion (1430)
Apple (1701)
Apple Corporate (583)
Apple Financial (200)
Apple History (53)
Apple Professional (54)
Apple TV (164)
Audio (452)
Bad Apple (132)
Beta Beat (155)
Blogging (87)
Bluetooth (20)
Bugs/Recalls (57)
Cult of Mac (879)
Deals (226)
Desktops (116)
Developer (282)
Education (112)
eMac (10)
Enterprise (148)
Features (415)
Freeware (401)
Gaming (403)
Graphic Design (40)
Hardware (1313)
Holidays (37)
Humor (591)
iBook (66)
iLife (240)
iMac (185)
Internet (341)
Internet Tools (1347)
iTS (985)
iTunes (825)
iWork (23)
Leopard (376)
Mac mini (112)
Mac Pro (54)
MacBook (207)
MacBook Air (83)
Macbook Pro (226)
MobileMe (47)
Multimedia (461)
Odds and ends (1498)
Open Source (283)
OS (943)
Peripherals (214)
Podcasting (183)
Podcasts (95)
Portables (198)
PowerBook (136)
PowerMac G5 (51)
Retail (615)
Retro Mac (50)
Rig of the Week (42)
Rumors (648)
Software (4483)
Software Update (429)
Steve Jobs (255)
Stocking Stuffers (50)
Surveys and Polls (98)
Switchers (115)
The Woz (35)
TUAW Business (257)
Universal Binary (281)
UNIX / BSD (61)
Video (909)
Weekend Review (84)
WIN Business (47)
Wireless (89)
Xserve (39)
iPhone/iPod News
iPhone (1814)
iPod Family (2133)
App Store (170)
SDK (30)
Mac Events
One More Thing (28)
Liveblog (2)
Other Events (228)
Macworld (489)
Mac Learning
AppleScript (4)
Ask TUAW (108)
Blogs (85)
Books (26)
Books and Blogs (62)
Cool tools (453)
Hacks (473)
How-tos (491)
Interviews (44)
Mods (191)
Productivity (592)
Reviews (114)
Security (167)
Terminal Tips (71)
Tips and tricks (577)
Troubleshooting (175)
TUAW Features
iPhone 101 (36)
TUAW Labs (4)
Blast From the Past (19)
TUAW Tips (151)
Flickr Find (39)
Found Footage (90)
Mac 101 (114)
TUAW Interview (31)
Widget Watch (198)
The Daily Best (1)
TUAW Faceoff (7)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Sponsored Links

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

#BloggerPostsCmts
1Cory Bohon521
2Robert Palmer5037
3Steven Sande4913
4Dave Caolo330
5Mike Schramm280
6Erica Sadun251
7Michael Rose1921
8Giles Turnbull170
9Mat Lu148
10Christina Warren1326
11Brett Terpstra110
12TUAW Blogger70
13Victor Agreda, Jr.613
14Lisa Hoover32
15Joshua Ellis20
16Jason Clarke10

Featured Galleries

DNC Macs
Macworld 2008 Keynote
Macworld 2008 Build-up
Apple Vanity Plates
DiscPainter
Crash Bandicoot Nitro Kart 3D
Macworld Expo 2007 show floor
Apple Texas Hold 'Em
The Macworld Faithful in Line

 

    Most Commented On (7 days)

    Recent Comments

    More Apple Analysis

    More from AOL Money and Finance

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