SSH

From Zodipedia

Jump to: navigation, search
Get OpenSSH in Cydia

SSH is a network protocol allowing data to be transfered between your computer and your iPhone/iPod Touch. It uses encryption to ensure confidentiality and integrity of data.

After OpenSSH (get it in Cydia) is installed on your device, you will be able to transfer files using a client on your PC (WinSCP), Mac (Cyberduck), or Linux (Ubuntu). There are alternatives (you will find them at the bottom of this page).


Contents



[edit] Transfer files using SSH (and Wifi)

[edit] Requirements


  • First, you need to install OpenSSH on your jailbroken device.
Image:Tuto-SSHReq-Img1.jpg Image:Tuto-SSHReq-Img2.jpg
Launch Cydia and wait until it's fully actualized. Search for OpenSSH, tap on it, then do Install and finally Confirm.
  • SBSettings is also needed because it will let you toggle SSH on and off (to free up memory).
Image:Tuto-SSHReq-Img3.jpg Image:Tuto-SSHReq-Img4.jpg
Open Cydia then search for SBSettings. Tap on it, then do Install and finally Confirm. Once it's installed, get back to the Springboard and then swipe on the status bar (the bar with network and clock). Check that the SSH icon is green (meaning that it's running). You can turn it off later by taping on it.
Comment this tutorial
  • On your computer, you need a client (WinSCP on PCs and Cyberduck on Macs).


[edit] Transfer ROMs using WinSCP (PC)


  • Your device and your computer must be connected to the same Wifi network !
Image:Tuto-SSHWinSCP-Wifi-Img1.jpg Image:Tuto-SSHWinSCP-Wifi-Img2.png
Launch SBSettings on your device (swipe on the status bar). You will see your device Wi-Fi IP Address. Launch WinSCP. Enter the followings in the login dialog :
Host name : your device Wifi IP address (port 22)
User name : root
Password : alpine
You can use the Save button (and check Save password) to store the session.
Note: There has been a problem from end users where WinSCP will not connect to the iPhone or iPod Touch and will time out. This has been solved by most people by filling in the Host Name and Username fields but leaving the password field blank. Then by clicking "Login" it will connect but ask you for a password, at which time you put in "alpine" without quotes and it finalizes the connection.
  • Let's make the connection.
Image:Tuto-SSHWinSCP-Img1.jpg Image:Tuto-SSHWinSCP-Img2.png
After hitting the Login button, this window will popup. Wait until it disappears. If it's the first time you're connecting your device, this message will popup. Answer Yes.
  • In WinSCP, the left pane is your computer, the right pane your device.
Image:Tuto-SSHWinSCP-Img3.png
You will be at first in /private/var/root/. Browse to /private/var/mobile/Media/ROMs/, then choose the directory corresponding to the emulator (here it's GBA).
Image:Tuto-SSHWinSCP-Img4.png
Select, in the left pane, the files you want to transfer and then drag and drop them in the right pane. A dialog will appear showing the progress.
  • Finally, let's launch the emulator (here gpSPhone).
Image:Tuto-SSHWinSCP-Img5.png Image:Tuto-SSHWinSCP-Img6.png
The emulator found the ROMs we transferred. Enjoy !
Comment this tutorial
  • You can use SBSettings to toggle off OpenSSH (to free up memory).


[edit] Change permissions


  • The permissions or chmod of a file (or folder) might need to be changed. Here's how to do it in WinSCP.
Image:Tuto-SSHWinSCP-Chmod-Img1.png
Simply right-click on the file (or folder) and choose Properties.
Image:Tuto-SSHWinSCP-Chmod-Img2.png Image:Tuto-SSHWinSCP-Chmod-Img3.png
Enter the permissions wanted in the Octal field and hit OK. When editing the permissions of a folder, you might want to check Set group, owner and permissions recursively. It will apply the permissions to all files and folders inside.
Comment this tutorial


[edit] Transfer ROMs using Cyberduck (Mac)

  • Your device and your Mac must be connected to the same Wifi network !
Image:Tuto-SSHWinSCP-Wifi-Img1.jpg Image:Tuto-SSHCyberduck-Img2.png
Launch SBSettings on your device (swipe on the status bar). You will see your device Wi-Fi IP Address. Launch Cyberduck and click on Open Connection. Enter the followings in the login dialog :
Choose 'SFTP (SSH File Transfer Protocol)'
Server : your device Wifi IP address (port 22)
Username : root
Password : alpine
Then hit the Connect button.
  • Let's make the connection
Image:Tuto-SSHCyberduck-Img3.png Image:Tuto-SSHCyberduck-Img4.png
After a successful connection, browse to /var/mobile/Media/ROMs/ and enter the directory corresponding to the emulator. Simply drag & drop files from the Finder to Cyberduck and wait until they are fully transferred.
Comment this tutorial

[edit] Change permissions

  • The permissions or chmod of a file (or folder) might need to be changed. Here's how to do it in Cyberduck.
Image:Tuto-SSHCyberduck-Img5.png
Click on the file(s) or folder and ,from the File menu, select Info. In the Permissions section of the window that appeared, check the boxes until you have the wanted permissions (777 for example). When editing the permissions of a folder, you might also want to check Apply changes recursively. It will apply the permissions to all files and folders inside. When you're done, hit Apply.
Comment this tutorial


[edit] Transfer files using Ubuntu's Nautilus filebrowser (Linux)

To SSH into your iPhone using Nautilus, simply go to Places > Connect to server... Then use the same settings as above:

  • your iPhone's WIFI IP address;
  • port 22;
  • (leave Folder empty);
  • user is root;
  • then you can decide to keep a bookmark on your desktop permanently.

Once the connection is established, enter the password alpine, and check remember forever.

[edit] Transfer files using USB

  • For a connection via USB, you'll have to install a software like iPhoneBrowser (windows only, official website) or i-Funbox (also windows only, official website). After you've installed iPhoneBrowser or i-Funbox, plug in your device then launch iPhoneBrowser or i-Funbox. You now have access to your iPhone or iPod touches file system.
  • There's also iTunnel for PCs and DiskAid for PCs and Macs but they're not free.
Personal tools