What's new
Apple iPad Forum

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

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

f4780y

Super Moderator
Staff member
Joined
Sep 11, 2010
Messages
7,113
Reaction score
652
Location
Troon, Scotland
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:

ntrddragn

iPF Noob
Joined
Mar 9, 2011
Messages
25
Reaction score
0
Location
so cal
I installed OpenSSH and SBSettings but no where do i see a toggle for OpenSSH. Did i do something wrong?
 
Last edited:
OP
f4780y

f4780y

Super Moderator
Staff member
Joined
Sep 11, 2010
Messages
7,113
Reaction score
652
Location
Troon, Scotland
ntrddragn said:
I installed OpenSSH and SBSettings but no where do i see a toggle for OpenSSH. Did i do something wrong?

Make sure you enable it in "toggles" in SBSettings from the "more" menu, and respring / reboot the iPad.
 

LoJak

iPF Noob
Joined
Mar 29, 2011
Messages
46
Reaction score
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
 

dstuttgen

iPF Novice
Joined
Jul 18, 2011
Messages
257
Reaction score
9
Location
Oconto, WI, USA
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:
 

Mickey330

Administrator
Staff member
Joined
Aug 30, 2010
Messages
11,892
Reaction score
2,225
Location
Western NY state (USA)
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.
 

dstuttgen

iPF Novice
Joined
Jul 18, 2011
Messages
257
Reaction score
9
Location
Oconto, WI, USA
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.
Thank you for the thread suggestion. I'll check it out. I did change the password.
Thanks again.
 

dstuttgen

iPF Novice
Joined
Jul 18, 2011
Messages
257
Reaction score
9
Location
Oconto, WI, USA
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
 

Mickey330

Administrator
Staff member
Joined
Aug 30, 2010
Messages
11,892
Reaction score
2,225
Location
Western NY state (USA)
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
 

bctf1

iPF Noob
Joined
Mar 25, 2011
Messages
31
Reaction score
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?
 

Mickey330

Administrator
Staff member
Joined
Aug 30, 2010
Messages
11,892
Reaction score
2,225
Location
Western NY state (USA)
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?

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
 

guthrien

iPF Noob
Joined
Jul 9, 2011
Messages
304
Reaction score
4
Location
Michigan
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.
 

Psunate77

iPF Noob
Joined
May 26, 2011
Messages
42
Reaction score
0
i am trying this now, my /root username and password i dont know
 

Most reactions

Latest posts

Top