You are viewing our Forum Archives. To view or take place in current topics click here.
SSH Mega Thread!
Posted:

SSH Mega Thread!Posted:

Charmeleon
  • Wise One
Status: Offline
Joined: Aug 03, 201112Year Member
Posts: 523
Reputation Power: 23
Status: Offline
Joined: Aug 03, 201112Year Member
Posts: 523
Reputation Power: 23
For those who don't already know, SSH (Secure Shell) is a network protocol for secure data communication. SSH is used for mostly for file transfer/remote administration on Unix based operating systems. All iPod Touch and iPhone models run a Unix based OS and have the ability to use SSH. In this thread, I am going to teach you how to use SSH to get the most out of your iDevice, as well as show you some very useful tips and tricks.




Preparing for an SSH Connection:

Before your ready to use SSH, there are some things you will need:

1. Jailbroken iDevice
2. OpenSSH
3. Computer
4. Wifi Connection
(Recommended)
5. SBsettings

Needed Programs:
1. OpenSSH
2. CyberDuck
3. (Windows) MobileTerminal




Now lets get started:

-Open Cydia and navigate to the search bar. Search for "OpenSSH" and install the package to your iDevice. OpenSSH is on the source Telesphoreo, therefore you should have the source added already.s

-Install SBsettings if you don't already have it. It is not required for this, but it is a good tool to have.

-Open SBsettings by sliding over the top bar. On the bottom, you should see "Wi-Fi IP Address:". Note that number, as we will need it later.




Important!
Once you install OpenSSH, make sure you follow the computer tutorial shortly after. Since OpenSSH uses a password to let computers view files on your iDevice, someone can really mess with you don't change the password. The password and username is generic, and if you don't change it, some very unsavory people can gain your personal information and harm your iDevice. Consider yourself warned.

Your about done on your iDevice for now. Lets move over to the computer for the next part of the tutorial. I will be doing TWO tutorials, one for mac, and one for PC.




Mac Tutorial:

I use a Mac, so I will do the Mac tutorial first. The Mac operating system features the ability to use OpenSSH without any outside programs. With this being said, I highly suggest that you download a program that's more hands on and easier than using terminal. For this section, you will need:

1. Mac Computer
2. [ Register or Signin to view external links. ]
3. Wireless Internet Connection

-Firstly, you need to go download CyberDuck. Open the .dmg file, and put the app in your applications folder. Don't open CyberDuck yet; We have a more important step first.

-Open terminal. If you don't know how to do that, hit Command and Spacebar. Type terminal into the spotlight search and hit enter. You should see a small white window with text in the top.

-This is where the IP address we got earlier comes into play. In terminal, type exactly this (without quotations) "ssh root@<your ip address>". Wait a few minutes. It seems like it isn't doing anything, but it is. It should ask you to accept the new host computer. Choose yes. Login with the password "alpine"

-This is the most important step. Once you are logged into your device, you must change your password. To do this, type "passwd" into terminal. It should look something like this:

iPod:~ root# passwd
Changing password for root.
New Password:
Retype new password:
iPod'~ root#

-Now type your new password. Make sure you enter it correctly, and write it down because it is important that you remember it. Repeat the steps above, but instead of typing "passwd", type "passwd mobile". You should use the same password as earlier. Once that goes through, your done in terminal. We will now move to CyberDuck.

-Open Cyberduck from your applications folder. It should look something like this:

-Click "Open Connection" in the top right corner. In the drop down bar, select SFTP. For server, type your iDevice's IP address that we used earlier. For username, type "root". Finally, for password use the password you created. Hit connect. [Note] For you to be able to connect to your iDevice, it has to be connected to the same internet as your computer, and the screen must be on. I recommend changing your settings so it never locks itself.

-Wait for it to connect, then you should be able to view the files on your iDevice. Congratulations! You have just completed the computer portion of the tutorial!





Windows Tutorial:

I use a mac, so if I make any mistakes feel free to tell me.

You will need:

1. Windows Computer (Tested on Vista/7)
2. [ Register or Signin to view external links. ]
3. MobileTerminal (on iDevice)
4. Wireless internet connection

-First, you will need to download CyberDuck. Cyberduck is a program that allows you to open various protocols on your computer. We will be using CyberDuck to open the SSH connection with your iDevice. Once you download CyberDuck, install it to your computer. Don't open it yet.

-Next, you need to open cydia on your iDevice and search for "MobileTerminal". Terminal is basically CommandPrompt for Mac. Since you are not running the Mac OS, you will need it on your iDevice. Install the package and open it up.

-Once your in MobileTerminal, type in "su" (without the quotations) and hit return. When it prompts you for a password, use "alpine". That is the default password for the OpenSSH server, and we will need to change it because your iDevice is venerable to SSH connections.

-When you enter the password, you should be logged in as root user. Type in "passwd" and hit return. Enter your new password. Make sure you write it down somewhere and remember it because it is important. Once you have changed the password, repeat the steps, except instead of typing "passwd", type "passwd mobile". You should use the same password as before.

-Your iDevice is now protected from unauthorized access. You can close MobileTerminal; You are now done using your iDevice.

-Now, you need to open CyberDuck. It should look something like this:

-Click "Open Connection" in the top right corner. In the drop down bar, select SFTP. For server, type your iDevice's IP address that we used earlier. For username, type "root". Finally, for password use the password you created. Hit connect. [Note] For you to be able to connect to your iDevice, it has to be connected to the same internet as your computer, and the screen must be on. I recommend changing your settings so it never locks itself.

-Once you do all that, hit continue and wait for a connection to be established. You should now be able to view all the files on your iDevice.





What you will need to get now, is a Cydia package called iFile. The package is available as a payed program on Cydia, but why jailbreak if you want to pay for stuff. To get iFile, and many other payed programs for free, add this source:

http:// cydia.xsellize. c o m/

Once you have the repository in your sources, search for iFile and install the xSellize one.

iFile is an app for iDevices that lets you navigate through all the files on your iDevice, much like SSH connection allows. It's main use for me personally, is letting me view the files I put on it via SSH.


Now that you are able to connect your iDevice to your computer, your possibilities are virtually limitless. I will show you how to do some very useful things with it now.




Creating Study-Guides/Cheat-Sheets:

Have you ever been in class taking a quiz or test and wished that you had all of the answers right in your pocket? With SSH you can do just that! I have found this very handy and this is one of my favorite uses for SSH. Lets get started!

-First, gather all your files into a folder on your desktop. This may include notes, outlines, stories, or anything you will need to look over. If you are on a mac, use a .doc or .rtf extension. Windows can use .txt, .doc, or any microsoft word save I believe.

-Open a connection to your iDevice via CyberDuck. In the top drop down bar, select / at the bottom. Then choose the var folder. Next, choose the mobile folder. Choose Documents, and make a new folder titled whatever you would like. Open that folder, and drag your files into the folder. Wait for it to stop downloading.

-Once it is finished, your files are on your iDevice! Open iFile and navigate your way to where your files are saved. If you can open them and read them, then you did everything correctly. Whenever you need an answer, you can pull out your notes without even touching a piece of paper!





Using Your iDevice As an External Hard Drive:

This tutorial is pretty straight forward. If you have performed the above tutorial, you should have a decent grasp on how to work CyberDuck, and iFile.

-Open a connection to your iDevice. Navigate to wherever you want to store your files. I would recommend not using any folders containing system files.

-Add any files that you wish to store. You could make hidden password logs, to-do lists, computer files, movies, pictures, documents, or basically anything you want. Upload it to your iDevice, and you're done. You can now transfer the files to any computer running an SSH client, or view all your files in iFile, so long as they are in the right formats.





Warnings And Precautions:

-When you are able to view and edit the system files of your iDevice, there is obviously a chance you can do something to mess up your iDevice. As long as you know where you're putting your files and you don't screw with the system, you should be safe.

-When enabling the ability of connecting a computer to your iDevice, there is always a chance of someone trying/gaining access to your iDevice. The best precaution is to change the password like I taught you in the tutorial. Always be sure to use a good password so it can not be guessed. The only way anyone can connect to your iDevice is when they are on the same internet, so be careful if you are using a public wifi such as Starbucks, McDonalds, or any other place.


I will be adding more later, and any requests anyone has will be taken into consideration and possibly added to the thread. My aim for this thread is to help people, and contribute to the community that I have learned so much from. If anyone has any questions, feel free to post a reply or private message me, and if you found this thread helpful a thanks is very appreciated.

The following 1 user thanked Charmeleon for this useful post:

Runite (01-12-2012)
#2. Posted:
Runite
  • TTG Senior
Status: Offline
Joined: Dec 22, 201112Year Member
Posts: 1,695
Reputation Power: 69
Status: Offline
Joined: Dec 22, 201112Year Member
Posts: 1,695
Reputation Power: 69
You should add WinSCP to Windows it works pretty well for me.
#3. Posted:
Charmeleon
  • Wise One
Status: Offline
Joined: Aug 03, 201112Year Member
Posts: 523
Reputation Power: 23
Status: Offline
Joined: Aug 03, 201112Year Member
Posts: 523
Reputation Power: 23
Runite wrote You should add WinSCP to Windows it works pretty well for me.
I can add it if you like. I use CyberDuck and I like the layout a lot more then WinSPC.
#4. Posted:
Crazyman777
  • Resident Elite
Status: Offline
Joined: Apr 24, 201113Year Member
Posts: 245
Reputation Power: 9
Status: Offline
Joined: Apr 24, 201113Year Member
Posts: 245
Reputation Power: 9
Cyberduck said it installed but it didn't
EDIT: It installed but it's now saying Connection failed
#5. Posted:
Charmeleon
  • Wise One
Status: Offline
Joined: Aug 03, 201112Year Member
Posts: 523
Reputation Power: 23
Status: Offline
Joined: Aug 03, 201112Year Member
Posts: 523
Reputation Power: 23
This thread really wasn't useful to anybody? All I wanted was some feedback.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.