SSH via USB on Mac OSX?

Discussion in 'Jailbreaks and iOS Hacks' started by -aggie-, May 5, 2010.

  1. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #1
    Has anyone come up with a way to SSH into the iPhone using USB on a Mac?

    There's this thread:

    http://forums.macrumors.com/showthread.php?t=805692

    but that's only using Windows. One of the posters suggested iTunnel (Windows) and from I can tell it seems to be available for the Mac, but the instructions are pretty complicated, if it can even be used. Anyone done this on a Mac?

    There's also a program called iPhoneTunnel that seems to have been finally made for the Mac, but then all the links to it are bad (almost looks like Apple had it pulled for some reason).
     
  2. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #2

    On my 3.1.2 with tethering enabled, when it was connected it just got an IP address. I could just SSH that way.
     
  3. grapes911 Moderator emeritus

    grapes911

    Joined:
    Jul 28, 2003
    Location:
    Citizens Bank Park
  4. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #5
    I could see this.

    My brother uses his iPod touch on the local university network and there are so many access points it is sometimes impossible to get on the same subnet, even when you are sitting on your laptop right next to the device.
     
  5. AWD iPhone macrumors member

    AWD iPhone

    Joined:
    Dec 14, 2009
  6. grapes911 Moderator emeritus

    grapes911

    Joined:
    Jul 28, 2003
    Location:
    Citizens Bank Park
    #7
    Assuming you don't need the internet at the same time, create an ad-hoc network with your computer and connect the phone to it. I've never tried it, but it should work.
     
  7. gixxerfool macrumors 6502a

    gixxerfool

    Joined:
    Jun 7, 2008
  8. -aggie- thread starter macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #9
    My wifi is sketchy. Sometimes it keeps dropping out, so I can't do anything via Cyber Duck.

    From what I've heard about this, it doesn't allow you to change attributes of files for one thing. I want something with the same capability as Cyber Duck.

    This is from the same place as iPhone Explorer. What's the difference? I'm not sure why they have two apps that do the same thing, if they do.
     
  9. gixxerfool macrumors 6502a

    gixxerfool

    Joined:
    Jun 7, 2008
    #10
    I will have to claim ignorance on this. I'm not sure I follow. If youre talking about editing plists and the like, I use text wrangler for that. I have changed icons and such. I have never used cyber duck so I'm not too sure on what you mean.
     
  10. -aggie- thread starter macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #11
    The attributes of a file (whether it's read, write, executable) or Disk/File Permissions. Very important to be able to change these sometimes.

    I just discovered NetaTalk on Cydia. This enables you to use Finder via USB to manipulate files in the iPhone. Anyone used this?

    Edit: Scratch the USB for MetaTalk.
     
  11. gixxerfool macrumors 6502a

    gixxerfool

    Joined:
    Jun 7, 2008
    #12
    Ok I get you now. You are correct. Diskaid does not do this.
     
  12. -aggie- thread starter macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #14
    Tried these at home. Neither have the capability to change file permissions.

    Edit: Found the solution. Use iPhoneSSH from here:

    1. http://rapidshare.com/files/316653216/iPhoneSSH.tar.bz2

    2. Unpack to a convenient location (you'll be going to this location in Terminal

    3. Open Terminal, change directory to the python-client folder and type:

    python tcprelay.py -t 22:2222 &
    (python is already included in Mac OSX as a program for use in Terminal)

    4. Now open CyberDuck and connect to localhost @ port 2222 i.e. like this:

    Add a bookmark.
    Edit it and choose use SFTP
    Give it a name (e.g., USB SSH)
    Server should be localhost
    Port is 2222 (or whatever you want)
    Username is root

    Then click to open the bookmark, choose always allow when the message comes up and enter your password.

    You now have SSH via USB.

    or you can just open a Terminal and type:
    ssh -p 2222 root@localhost

    CyberDuck is easier!
     
  13. lawlist, Dec 11, 2010
    Last edited: Dec 12, 2010

    lawlist macrumors member

    Joined:
    May 19, 2010
    #15
    python tcprelay.py -t 22:2222 &

    Any ideas on how to make this persistent and start at login -- it appears that tcprelay.py closes all by itself after a period of time (perhaps when the user logs out of localhost connection)?
     

Share This Page