HOW TO: SSH into your iPod touch from the Finder

Discussion in 'iPod touch Hacks' started by TheSpaz, Jan 6, 2008.

  1. TheSpaz macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #1
    Here's how to mount your iPod touch via SSH right directly in the Finder and modify/add/delete files too. Very simply tutorial here:

    I'm assuming you already have jailbroken your iPod touch and installed SSH on it.

    1. Download and install MacFUSE from Here (Make sure you use the version that is built for the OS X version you are running)

    2. Download and install MacFusion Here

    3. Restart your Mac

    4. Run MacFusion and you should see a new icon in your menu bar.

    5. Click the MacFusion icon and browse to Favorites>Edit...

    6. Now click the + symbol at the bottom of the window and choose "SSH"

    7. Enter a name for your iPod touch in the top field (note: This does not have to be "root" -- it can be anything you want)

    8. Setup your IP address (if you don't know what your iPod's IP address is, just go into Settings>Wifi> and Click on the blue arrow beside your wireless router to see your iPod's IP)

    9. Port 22 is what you want for Port
    Server Path should be /
    User name is root
    Password will be whatever you set up when you jailbroke your iPod (the default password if you did not choose one is alpine)
    Authentication should be on Password
    Don't worry about the Extra Options

    10. Click "Ok" and then click "Mount"

    And that's it! I hope the instructions were pretty clear... it's very simple to do and it's better than having to use Fetch or CyberDuck or Transmit because it's very convenient to use the Finder.

    I've posted a screenshot of my settings. (I did not worry about blocking out my IP address because there's no way that anyone outside my network can connect to me using that local IP address. And also, I don't care if people know what my iPod's name is)
     

    Attached Files:

  2. Oh My Chester macrumors newbie

    Joined:
    Dec 17, 2007
  3. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #3
    Yes but, this thread isn't about CyberDuck. It's about using the Finder and I find it more convenient to use the Finder and browse the file system the way I am used to on any other connected server. If you would like to continue using CyberDuck then ignore this thread... that's all.
     
  4. ArchiMark macrumors 6502

    Joined:
    Feb 2, 2003
    Location:
    Silicon Valley
    #5
    Maybe someone can help me mount my iPod Touch on my Mac via SSH...

    Have followed your instructions but can't connect...have tried other solutions as well and can't connect via SSH.

    Have OpenSSH on my Touch and is turned on.

    Have followed your instructions but it just won't connect.

    Thinking that it must either be related to some Mac OSX System Prefs setting that's not right or something to do with configuration of my WiFi router????

    However, I am able to connect Touch to Mac using USB cable with

    A) iTunes

    B) iPhoneDrive

    Also, I can connect to internet OK at home with my WiFi network and other WiFi networks....

    So, have a feeling that there's something simple that needs to be changed in order to get SSH to work, just don't know what it is!

    Would greatly appreciate any and all suggestions on how to get this working.

    Thanks,

    Mark
     
  5. Elliot Hunter macrumors newbie

    Joined:
    Jan 12, 2008
    #6
    Can't see mounted iPod

    hello,
    i have completed the instructions you have given, and as far as i can see macfusion says that the ipod is mounted, but i do not see it in finder or on the desktop. does anyone know what i may have done wrong?
     
  6. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #7
    Are you sure its mounted? Try pressing cmd-shift-c and see if it appears with your other volumes.
     
  7. zumpy macrumors member

    Joined:
    Jan 11, 2008
    #8
    This worked but......

    I found this program to work well but I am still unable to get terminal to connect to the touch. Is there a way to run commands through this app?
    I'm really unfamiliar with the file structure and would hate to try just moving the files around to try and free up space. There appears to be multiple instances of librairies,media,var,root etc., all very confusing to me.
    Any help would be appreciated.
    thanks

    zumpy
     
  8. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #9
    The best thing to do is, don't move or delete anything. There are supposed to be multiple Libraries and stuff... don't worry... it's how Unix is. Now, did you try this in the Mac OS X Terminal:

    Code:
    ssh -l root@192.168.x.x
    Replace 192.168.x.x with your iPod's IP address.

    The Terminal should prompt you with a password and then you'll be able to do normal Terminal commands on your iPod.
     
  9. zumpy macrumors member

    Joined:
    Jan 11, 2008
    #10
    Tried that

    Yes I have been trying that.
    Terminal doesn't accept the default pass of alpine

    xxxxxx-xxxxxx-macbook-pro:~xxxxxxxxxxxx$ ssh -i root 192.168.1.xxx
    Warning: Identity file root not accessible: No such file or directory.
    xxxxxxxxxxxx@192.168.1.110's password:
    Permission denied, please try again.
    xxxxxxxxxxxx@192.168.1.110's password:
    Permission denied, please try again.
    xxxxxxxxxxxx@192.168.1.110's password:
    Permission denied (publickey,password).
    xxxxxx-xxxxxx-macbook-pro:~ xxxxxxxxxxxx$
     
  10. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #11
    You may have chosen a different password than alpine though.

    Also, why is everyone so afraid to show their user name? Nobody is going to be able to hack into your computer with a 192.168.x.x IP because that is a local LAN IP and nobody could use that number unless they're actually connected to your router.
     
  11. zumpy macrumors member

    Joined:
    Jan 11, 2008
    #12
    But I didn't.

    That password works for both Cyberduck and Macfusion, so I would expect it to work for terminal.
    Not posting my username after my previous post was an accident. I clicked on submit before I realized I had not signed it, and didn't think it warranted editing.
    And I chose not to show my login name because it is my real name, and I'm not comfortable posting my full name on the internet. An anonymous username is one thing, but I think posting my given names online might be just a bit too much like inviting identity theft.
    Call me paranoid, but I'd like to keep some illusion of privacy!

    zumpy
     
  12. dannystutz macrumors newbie

    Joined:
    Jan 12, 2008
    #13
    whats your reason for using the -i option with ssh? for my setup, using "ssh root@192.168.1.2" (or whatev your ip is) works just fine.
     
  13. zumpy macrumors member

    Joined:
    Jan 11, 2008
    #14
    Well I thank you.

    The only reason I was using the -i is because I was following instructions from a post. I wish I understood command line enough to figure all this out myself, but I don't, so I rely on the knowledge of others.
    It appears you suggestion worked.I seem finally able to log into my touch from my mac. I see this:
    Last login: Sun Jan 13 00:21:17 2008 from 192.168.1.101
    #
    so I'm guessing that has me logged into the drive.
    Now that I see what I was doing wrong all along, it makes me a bit hesitant to continue to follow the instructions from that post, as it takes so little of an error to make a big mistake. I will continue to read some more and try to understand it enough to avoid problems.
    Again I thank you for taking a look at my post and noticing what the problem was. It's encouraging.

    zumpy
     
  14. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #15
    Ah, okay, I must have missed that... It's not an "i", it's -l (lowercase L)... Sorry. One thing you can do though is paste code into the terminal to avoid similar errors in the future.
     
  15. dannystutz macrumors newbie

    Joined:
    Jan 12, 2008
    #16
    I think you're fine following the instructions. Looks like one of the instructions used the -l option with ssh, which kind of looks like an i. When in doubt about a command you're running in terminal, read the man pages - ' man ssh ' should tell you why you had the problem. G'luck!
     
  16. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #17
    Haha, I beat you to it!!! *Takes a bow*
     
  17. ArchiMark macrumors 6502

    Joined:
    Feb 2, 2003
    Location:
    Silicon Valley
    #18
    How About SSH For Me Too!

    Now that you've got zumpy ssh'n OK, maybe you get me going too!

    Please read my post above to get more background....

    Also, just tried ssh again and this is what I get from Terminal:

    Code:
    user-11xxxd:~ marks$ sudo ssh -l root@192.168.1.2
    Password:
    usage: ssh [-1246AaCfgkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
               [-D [bind_address:]port] [-e escape_char] [-F configfile]
               [-i identity_file] [-L [bind_address:]port:host:hostport]
               [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
               [-R [bind_address:]port:host:hostport] [-S ctl_path]
               [-w local_tun[:remote_tun]] [user@]hostname [command]
    user-11xxxd:~ marks$ ssh root@192.168.1.2
    ssh: connect to host 192.168.1.2 port 22: Operation timed out
    user-11fxxxd:~ marks$ ssh root@192.168.1.2
    ssh: connect to host 192.168.1.2 port 22: Operation timed out
    user-11xxxd:~ marks$ 
    
    Have tried with and without using sudo....but same results....

    Just tried pinging iPodTouch and got the following:

    Code:
    Ping has started ...
    
    PING 192.168.1.2 (192.168.1.2): 56 data bytes
    
    --- 192.168.1.2 ping statistics ---
    10 packets transmitted, 0 packets received, 100% packet loss
    

    :confused:

    Thanks!
     
  18. dannystutz macrumors newbie

    Joined:
    Jan 12, 2008
    #19
    my experience with ssh tells me that when i get the "Operation Timed out" message that SSH is either off, or a firewall is blocking it. since the iPod touch doesn't have extensive firewall capabilities *heh*, i'd assume the former. looks like you confirmed with ping that you have connectivity, which is exactly what i would have done. the next step is to confirm (from the touch) that (1) the IP of the touch really is 192.168.1.2 and (2) ssh is indeed on.
    i really would just stick with the simplified syntax of "ssh root@192.168.1.2" there should be any reason in this case to use any options, or to use sudo. ssh doesn't need privileges in this case.
    if it's the first time you're connecting via ssh to your iPod touch, it may take a few seconds while the touch generates its key. but, once it prompts you for your password, just type in "alpine" and you'll be in.
     
  19. ArchiMark macrumors 6502

    Joined:
    Feb 2, 2003
    Location:
    Silicon Valley
    #20
    THANKS for your help, dannystutz!!!

    I check again and OpenSSH is installed and turned on, on my Touch...

    Just tried 'ssh root@192.168.1.2' as you suggested, but after a bit I get the message:

    Code:
    ssh: connect to host 192.168.1.2 port 22: Operation timed out
    
    So, I wonder if my ethernet/WiFi/DSL router is blocking or is there something else on Touch that needs adjusting?

    Any suggestions how to deal with this???
     
  20. brando88 macrumors 6502

    Joined:
    Nov 13, 2007
    #21
    Another, dare I say, much simpler method is available for Mac owners.

    Just install AFP with bonjour on your iPhone/Touch, and the sidebar in OS X will automatically find and display your device.

    This is THE EASIEST way to transfer files to your device from a Mac.
     
  21. ArchiMark macrumors 6502

    Joined:
    Feb 2, 2003
    Location:
    Silicon Valley
    #22
    Excellent idea, Brando88!!! Will try it this evening when I get home from work....

    However, would still like to solve the problem I've been having ssh'ing.....
     
  22. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #23
    Hey... do NOT use File Sharing. I repeat. DO NOT USE FILE SHARING. If you copy over files or Apps they get corrupt. It happened to me and I stopped using it. Then I was having a friend manually install an App I made and he couldn't get it to work no matter what he tried... then I found out he was installing it through AFP and as soon as he used SSH, the problem was fixed... AFP was corrupting parts of the file during the transfer... it's unsafe... it's unsafe.
     
  23. ArchiMark macrumors 6502

    Joined:
    Feb 2, 2003
    Location:
    Silicon Valley
    #24
    Thanks for the heads-up on this, TheSpaz!!

    But any ideas on how I can get SSH to work????

    Thanks!
     
  24. yosengren macrumors newbie

    Joined:
    Jan 14, 2008
    #25
    okay so did everything and i am conencted and am able to mount
    but i cannot copy objects into the phone i get an error code saying i don't have the priveliges

    what is the deal
     

Share This Page