+ Reply
Results 1 to 11 of 11

Your favorite Apple, iPhone, iPad, iOS, Jailbreak, and Cydia site.


Thread: real SSH to your iPhone

is a discussion within the

File Mods

forums, a part of the

iPhone Modding

section;
all credit for this goes to NerveGas from #iphone irc chat channel over at irc.osx86.hu, anyway, what hes done is bascially open up ssh on the iphone which will then
...
  1. #1
    Retired Moderator arthursdomain's Avatar
    Join Date
    Jul 2007
    Location
    Mililani, Hawaii
    Posts
    850
    Thanks
    12
    Thanked 135 Times in 85 Posts

    Default real SSH to your iPhone
    all credit for this goes to NerveGas from #iphone irc chat channel over at irc.osx86.hu, anyway, what hes done is bascially open up ssh on the iphone which will then open it up to remote access and upload of more shell commands and 3rd party apps, you can ssh in from any mac terminal

    Original Page


    Working SSH Instructions by NerveGas

    Previous instructions on the net have required the use of restore mode to set
    binary permissions. Unfortunately, restore mode doesn't work with all public
    versions of iPhoneInterface I've tried. The instructions below work by
    overwriting an existing binary on the system with chmod, and then calling it
    with the appropriate arguments to set permissions. The result is a fully
    functional SSH setup. You can then proceed to uploading your own world builds,
    or other programs to execute via commandline.

    Step 1: Key Creation

    On your Mac or PC, download dropbear from here:

    http://matt.ucc.asn.au/dropbear/dropbear.html

    Run: ./configure && make

    You don't need to install the software, just run:

    ./dropbearkey -t rsa -f dropbear_rsa_host_key
    ./dropbearkey -t dss -f dropbear_dss_host_key

    And copy the two new key files into your iPhoneInterface directory.

    Step 2: Uploading dropbear and friends

    Download the iphone-ssh kit and the iphone binaries kit:

    http://www.abigato.com/iphone-ssh-kit-vr1.tar.bz2
    http://netkas.freeflux.net/blog/

    Rename sh6 from the kit to sh.

    Use the jailbreak application to break out of jail, and then open
    iPhoneInterface to connect.

    mkdir /etc/dropbear
    cd /etc/dropbear
    putfile dropbear_rsa_host_key
    putfile dropbear_dss_host_key
    cd /bin
    putfile chmod
    putfile sh
    cd /usr/bin
    putfile dropbear

    Step 3: Overwriting 'update' with 'chmod'

    While still connected to iPhoneInterface, make a backup copy of
    /usr/sbin/update:

    cd /usr/sbin
    getfile update

    Rename this to update.original on your local filesystem

    Now copy the 'chmod' binary to 'update' and upload it back to the
    iPhone:

    cd /usr/sbin
    putfile update


    Step 4: Overwriting the update configuration

    Now the 'update' binary is really 'chmod', and has execute permissions! We
    just need to tell the iPhone to chmod next time it boots. To do this, we
    download /System/Library/LaunchDaemons/com.apple.update.plist and add our
    own arguments to ProgramArguments:

    0 /usr/sbin/update
    1 555
    2 /bin/chmod
    3 /bin/sh
    4 /usr/bin/dropbear

    Save the new plist and upload it back to the iPhone:

    cd /System/Library/LaunchDaemons
    putfile com.apple.update.plist

    While we're here, lets also:

    putfile au.asn.ucc.matt.dropbear.plist

    Step 5: Reboot the iPhone twice.

    The first reboot should set the permissions on the dropbear and related
    binaries. The second reboot should start dropbear, so you can ssh to it:

    ssh -l root [IP ADDRESS]
    The root password is 'dottie'.


    Step 6: Replace the original update and com.apple.update.plist files

    Don't forget to put the old update files back. Rename update.original back
    to update, and delete the extra ProgramArguments you added to
    com.apple.update.plist. Now put them back:

    cd /System/Library/LaunchDaemons
    putfile com.apple.update.plist

    cd /usr/sbin
    putfile update

    Step 7: Change the root password

    If you don't like 'dottie', you can generate a new encrypted password
    by running:

    perl -e 'print crypt("MYPASSWORD", "XU");'

    Where MYPASSWORD is the new password you want, and XU is a random two-letter
    salt. Copy the encrypted output and replace the existing one in
    /etc/master.passwd on the phone.

    You're done! Enjoy!
    -NerveGas
    after running into so many walls its not funny, i decided to give up for now... this whole process requires a mac/linux box with compiling tools. Any mac users out there wanna give it a shot? I will try to make a windows version of this or at lesat find programs that can replicate these commands for windows
    Last edited by arthursdomain; 07-23-2007 at 01:23 PM.

  2. #2
    iPhone? More like MyPhone
    Join Date
    Jul 2007
    Posts
    105
    Thanks
    0
    Thanked 4 Times in 4 Posts

    whats the point

  3. #3
    Green Apple
    Join Date
    Jul 2007
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default the point would be
    I think the point of this exercise if all worked well would be to be able to shell in and modify files without jailbreaking everytime. You could just ssh in and mod files, then reboot.

    saving a lot of time and possibly opening the possibility for some secure ftp type programs as well if they got that running.

  4. #4
    iPhone? More like MyPhone GreggSymington's Avatar
    Join Date
    Jun 2007
    Location
    Windsor Locks, CT
    Posts
    227
    Thanks
    11
    Thanked 23 Times in 21 Posts

    Quote Originally Posted by fdot View Post
    whats the point
    If your not excited about this I think your in the wrong place.

  5. #5
    Green Apple
    Join Date
    Jul 2007
    Posts
    47
    Thanks
    0
    Thanked 3 Times in 3 Posts

    very interesting, now to get to the next step, ssh client on the phone that i can ssh outbound.

  6. #6
    Green Apple xIxAMxHOLLYWOODx's Avatar
    Join Date
    Jul 2007
    Posts
    80
    Thanks
    7
    Thanked 6 Times in 5 Posts

    I've only done jailbreak once on my phone. The first time. other than that I just go into iphoneinterface and mod away. Remove and replace. havent had a problem yet...

  7. #7
    iPhone? More like MyPhone
    Join Date
    Jul 2007
    Posts
    105
    Thanks
    0
    Thanked 4 Times in 4 Posts

    yes i know the point i actually spent most of yesterday trying this and i was the irc all day talking the dev crew

  8. #8
    What's Jailbreak?
    Join Date
    Jul 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    thankyou
    thankyou
    thankyou
    thankyou
    thankyou
    thankyou
    thankyou
    thankyou
    thankyou
    thankyou
    thankyou
    thankyou
    thankyou

  9. #9
    Green Apple
    Join Date
    Jul 2007
    Posts
    46
    Thanks
    21
    Thanked 0 Times in 0 Posts

    can anyone post an update of the kinds of advancement or tinkering you've accomplished using this very smart hack...whoever came up with this had their thinking cap on. Wondering where people are going wit it.

    Thanks and have a nice day.
    --jonathan

  10. #10
    Green Apple BiGBaD's Avatar
    Join Date
    Jul 2007
    Posts
    67
    Thanks
    9
    Thanked 11 Times in 5 Posts

    http://www.hacktheiphone.com/iphone_...h_windows.html


    Try this, just run the batch file and it dos it all for in in Windows...

  11. #11
    iPhoneaholic uPhone559's Avatar
    Join Date
    Jul 2007
    Location
    California
    Posts
    452
    Thanks
    63
    Thanked 116 Times in 31 Posts

    ive read so many tutorials and im still confused, winscp isnt working for me, i did ssh install and it went through, putty times out - yes i put in password and ip perfectly. terminal icons where are they? and what does it do, someone help me out lol pleaes
    Hit Thanks!

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts