1. Due to the recent site upgrade, the iPadForums (iPF) App will no longer work. The new iPadForums.net website has been designed from the ground up to work perfectly from any mobile, tablet, or desktop computer using the built in internet browser. Create a shortcut to iPadForums.net on your home screen by following these steps: Create an icon for iPadForums.net

HOW TO - Use Secure Shell (SSH) with the iPad

Discussion in 'Jailbreaking & Hacking Tutorials & How-To Guides' started by f4780y, May 4, 2011.

  1. f4780y
    Online

    f4780y Super Moderator Staff Member

    Joined:
    Sep 11, 2010
    Messages:
    7,109
    Thanks Received:
    634
    Trophy Points:
    113
    Location:
    Troon, Scotland
    Ratings:
    +634 / 0
    What is SSH?
    Secure Shell, more commonly referred to as SSH, is a network protocol which allows data to be exchanged between two devices via a secure channel using shell accounts. SSH should not be confused with SHSH Blobs which are a completely separate subject.
    Wikipedia has a detailed article on SSH if you are interested in the history and detail here - Secure Shell - Wikipedia, the free encyclopedia

    Why would I use SSH?
    On a jailbroken device, SSH is a great tool for transferring files between your desktop computer (or any other client) and your iPad WITHOUT using iTunes. It provides you complete freedom to copy, move, or delete files however you like as well as access the shell and run commands against iOS just as you might do on other linux / unix like systems.

    One of the most common uses of SSH on a jailbroken device is manually copying theme components to and from Winterboard, as well as applying theme component without using Winterboard at all (some folks just don't like it and consider it a resource hog). You can easily move a theme from your iPad onto your desktop computer, change the files somehow, then move them back onto the iPad. Coolness!

    How do I enable SSH?
    In Cydia, you should install the package OpenSSH. If you are using SBSettings you will automatically get a SSH toggle added to the interface to allow you to enable and disable the service whenever you want. That's it, you are good to go!

    Is SSH really secure?
    Yes it is, to establish a SSH connection with a device you need to know one or more shell account username and password combinations for the operating system. By default, your iPad has several shell accounts, but the two most important ones are root and mobile. Like most unix / linux type systems, the root user has acces to everything on the file system. The mobile user is essentially "you" and has access to all your personal files and documents (which root also has access to). By default the passwords for both these users is alpine and so it is important to change this default password for BOTH these users to something of your choosing. Otherwise someone on the same network connection as you could connect via SSH using root / alpine and gain access to all your files and data. I have provided a guide below on how to change the default passwords...

    I've installed OpenSSH on my iPad, now what?
    Once you have SSH enabled you will be able to open a connection from your desktop computer or another device with an SSH client installed. There are literally hundreds of different clients to choose from depending on what you want to do...
    The devices you wish to connect must be on the same wifi network, and it should be as simple as providing the IP address and root / alpine credentials to the client software and answering any prompts which appear. Normally, for the first connection between devices, a "fingerprint" file is saved as a token of trust for future connections. You'll get the idea once you give it a try.

    On Windows.
    PuTTY is an excellent free SSH client to access the command shell on the iPad.
    WinSCP is a free SFTP client which allows you to securely transfer files between the desktop and the iPad filesystem in an explorer like interface.
    Wise-FTP is a paid file transfer client..., and there are many many more.

    I recommend you try PuTTY and WinSCP first as freebies before shelling out (pun intended) on a commercial package. They might just be perfect for your needs!

    On OSX.
    CyberDuck and Terminal are both excellent choices, and I am sure there are a lot more!

    How do I change the default passwords?
    Using your chosen shell client, such as PuTTY or iSSH, connect to the iPad and login with the root / alpine default credentials.
    enter the passwd command in the shell. You will be prompted to provide your new password and confirm it.
    You should also change the password for mobile / alpine. You can do this during the same session as root by using the command passwd mobile and provide the new password details.
    Don't forget, you will now need to use your new password whenever you make a SSH connection to your device. Try it now! alpine should no longer grant you access, but your new password should.

    Don't forget the golden rules!
    Finally, before you go off messing with your iPad files to your hearts content. Remember the golder rules:
    1. Backup iPad - Always have a recent backup of your iPad in iTunes so that if you mess something up by accident, you will be able to restore to a recent backup.
    2. Backup Copy - Before you mess with a file, take a quick copy of it (it's easy thanks to SSH). There are many files on your iPad where if you mess with them and make a mistake, a restore will be your only option unless you can restore a copy...

    Happy SSHing fellow jailbreakers!
    Last edited: Jan 23, 2012
    • Like Like x 1
  2. ntrddragn
    Offline

    ntrddragn iPF Novice

    Joined:
    Mar 9, 2011
    Messages:
    25
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    so cal
    Ratings:
    +0 / 0
    I installed OpenSSH and SBSettings but no where do i see a toggle for OpenSSH. Did i do something wrong?
    Last edited: May 20, 2011
  3. f4780y
    Online

    f4780y Super Moderator Staff Member

    Joined:
    Sep 11, 2010
    Messages:
    7,109
    Thanks Received:
    634
    Trophy Points:
    113
    Location:
    Troon, Scotland
    Ratings:
    +634 / 0
    Make sure you enable it in "toggles" in SBSettings from the "more" menu, and respring / reboot the iPad.
  4. ntrddragn
    Offline

    ntrddragn iPF Novice

    Joined:
    Mar 9, 2011
    Messages:
    25
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    so cal
    Ratings:
    +0 / 0
  5. LoJak
    Offline

    LoJak iPF Novice

    Joined:
    Mar 29, 2011
    Messages:
    46
    Thanks Received:
    0
    Trophy Points:
    0
    Ratings:
    +0 / 0
    Mobile terminal does not work on the ipads. Get issh from the app store and connect to your own device on localhost 127.0.0.1

    Sent from my iPad using iPF
  6. dstuttgen
    Offline

    dstuttgen iPad Fan

    Joined:
    Jul 18, 2011
    Messages:
    257
    Thanks Received:
    9
    Trophy Points:
    18
    Location:
    Oconto, WI, USA
    Ratings:
    +9 / 0
    I have WinSCP set up on my Windoze laptop and can access the iFile on my iPad2 but how then do I access any files on my Windoze laptop from my iPad? I had understood it to mean I could access one machine from another room or across the house. I have OpenSSH installed and enabled in SB settings but I guess I don't understand what is the iPad counterpart to WinSCP.

    DOH!:confused:
  7. Mickey330
    Offline

    Mickey330 Administrator Staff Member

    Joined:
    Aug 30, 2010
    Messages:
    11,369
    Thanks Received:
    1,649
    Trophy Points:
    113
    Location:
    Western NY state (USA)
    Ratings:
    +1,744 / 0
    You are looking for a remote desktop application, such as Splashtop or Jump. They are the ones where you can control your Windows machine with the iPad.

    Here's a good thread to get you started on finding one that'll suit your needs: http://www.ipadforums.net/ipad-apps/1528-best-remote-desktop-app.html

    Good luck.

    Marilyn

    P.S. Now that you have OpenSSH installed, may I suggest you change your default root and mobile passwords on the iPad - as a precautionary measure.
  8. dstuttgen
    Offline

    dstuttgen iPad Fan

    Joined:
    Jul 18, 2011
    Messages:
    257
    Thanks Received:
    9
    Trophy Points:
    18
    Location:
    Oconto, WI, USA
    Ratings:
    +9 / 0
    Thank you for the thread suggestion. I'll check it out. I did change the password.
    Thanks again.
  9. dstuttgen
    Offline

    dstuttgen iPad Fan

    Joined:
    Jul 18, 2011
    Messages:
    257
    Thanks Received:
    9
    Trophy Points:
    18
    Location:
    Oconto, WI, USA
    Ratings:
    +9 / 0
    Thanks again for all your help last night. I got splahtop set up on my iPad and the Winbox.
    Transfered my first files this morning. Put 4 music albums in /var/root and a few pdf's but although I can then place the pdf files in "books", on the shortcut sidebar, and they show up nicely in iBook, when I move my music to the "Media Library" in the sidebar they don't show up when I open "My iPod" to use the player functionality. Not excatly sure what is happening there, I can still play them from the iFile sidebar but would definitely feel better if I could access them from the player.

    Thanks again to all who helped me.;)

    Dan
  10. Mickey330
    Offline

    Mickey330 Administrator Staff Member

    Joined:
    Aug 30, 2010
    Messages:
    11,369
    Thanks Received:
    1,649
    Trophy Points:
    113
    Location:
    Western NY state (USA)
    Ratings:
    +1,744 / 0
    Yeah, well, unfortunately, Apple/iTunes/iPod app code music a little differently (some would say it is annoying odd).

    It's best to not to try to put music onto the iPad for playing spefically through the iPod app. It's best to leave that kind of synching to iTunes.

    That doesn't stop you from SSHing in and putting music on the iPad (I think there are music playing apps you can use, but I don't remember any off the top of my head). Just don't try to put it in the iPod section. Won't work (AFAIK).

    Marilyn
  11. dstuttgen
    Offline

    dstuttgen iPad Fan

    Joined:
    Jul 18, 2011
    Messages:
    257
    Thanks Received:
    9
    Trophy Points:
    18
    Location:
    Oconto, WI, USA
    Ratings:
    +9 / 0
    Thanks, that does help.

    ciao
  12. bctf1
    Offline

    bctf1 iPF Novice

    Joined:
    Mar 25, 2011
    Messages:
    31
    Thanks Received:
    0
    Trophy Points:
    0
    Ratings:
    +0 / 0
    After the root and mobile passwords have been changed with putty on ipad 2, are the new passwords saved during an itunes backup? Will they revert back to alpine if the ipad is restored to a previous firmware version or unjailbroken?
  13. Mickey330
    Offline

    Mickey330 Administrator Staff Member

    Joined:
    Aug 30, 2010
    Messages:
    11,369
    Thanks Received:
    1,649
    Trophy Points:
    113
    Location:
    Western NY state (USA)
    Ratings:
    +1,744 / 0
    Yes, the passwords will revert back to alpine if you restore or unjailbreak.

    That's because when you restore - you are essentially reloading the software and setting up the iPad as new (e.g. fresh out of the box). So, all the changes you made to your old, jailbroke firmware will be gone.

    The iTunes backup won't affect the passwords. As long as you keep the jailbreak and don't restore - the passwords will stay what you set them as.

    Marilyn
  14. guthrien
    Offline

    guthrien iPad Enthusiast

    Joined:
    Jul 9, 2011
    Messages:
    304
    Thanks Received:
    4
    Trophy Points:
    0
    Location:
    Michigan
    Ratings:
    +4 / 0
    I really dislike iTunes. It's the most un-Apple Apple product I've used. Do any of you primarily use SSH to take care of your syncing needs? Most of my data I use on iPad has a cloud counterpart.
  15. Psunate77
    Offline

    Psunate77 iPF Novice

    Joined:
    May 26, 2011
    Messages:
    42
    Thanks Received:
    0
    Trophy Points:
    0
    Ratings:
    +0 / 0
    i am trying this now, my /root username and password i dont know
  16. f4780y
    Online

    f4780y Super Moderator Staff Member

    Joined:
    Sep 11, 2010
    Messages:
    7,109
    Thanks Received:
    634
    Trophy Points:
    113
    Location:
    Troon, Scotland
    Ratings:
    +634 / 0
    Everyone's default user name and password is:

    root / alpine
  17. FrenchTV
    Offline

    FrenchTV iPF Novice

    Joined:
    Aug 6, 2011
    Messages:
    50
    Thanks Received:
    0
    Trophy Points:
    0
    Location:
    Belgium
    Ratings:
    +0 / 0
    whats curious is who has access to the itunes back ups on the net since apple logged data in the past, do developers have access, certain apple people? its interesting to know since privacy does not exist on the net or telecommunications, who knows if the factories in the east even put a chip to track or shut our systems down
  18. jaomadn
    Offline

    jaomadn iPF Noob

    Joined:
    Jul 28, 2012
    Messages:
    1
    Thanks Received:
    0
    Trophy Points:
    0
    Ratings:
    +0 / 0
    Why openssh for ipad has a maximum of password character to 8. Its useless to set more than 8 since it only takes the 8 character and remaining is garbage. This for root and mobile.
  19. Commodore
    Offline

    Commodore iPad Fan

    Joined:
    Jul 30, 2012
    Messages:
    251
    Thanks Received:
    3
    Trophy Points:
    18
    Location:
    Europe
    Ratings:
    +3 / 0
    Does SSH server on iPad turn off or get suspended, a few moments after the device goes into standby, or should it work indefinitely (until you disable it manually, that is)? I had a few cases when WinSCP session was somehow frozen or halted, but I'm not sure whether it was because of iPad's sleep mode activities (with gradual disabling of some services), or some other problems on my WinSCP / computer side.
  20. f4780y
    Online

    f4780y Super Moderator Staff Member

    Joined:
    Sep 11, 2010
    Messages:
    7,109
    Thanks Received:
    634
    Trophy Points:
    113
    Location:
    Troon, Scotland
    Ratings:
    +634 / 0
    The SSH services does not get stopped in sleep mode. The tweak comes with an SBSettings toggle which you can use to turn the service on or off, but if it is set to on it will remain that way.

    Depending on what device you have and the setup in your home, it could be the wifi signal dropping after 45 seconds of going into sleep mode? Wifi does not stay up and running all the time in sleep mode under certain circumstances and configurations. Is yours a 3G device with cellular signal?

Share This Page

Search tags for this page
free ipad ssh
,
how to connect ipad mini to putty
,
how to use openssh on ipad
,
ipad putty
,

ipad ssh

,
openssh ipad
,
putty connect to ipad
,

putty for ipad

,
putty for ipad download
,

putty ipad

,
putty ipad app
,
putty on ipad
,
putty ssh for ipad
,
shell for ipad
,
shell on ipad
,
ssh
,
ssh for ipad
,

ssh ipad

,
ssh ipad tutorial
,
ssh on ipad