How to install a .deb file via SSH and terminal
Hey guys, this tutorial was a request from one of our readers, Mason, who was having trouble finding Ultrasn0w in Cydia. This is a great method to quickly install any .deb file on your iDevice from your computer. This is useful if Cydia won't install an app for whatever reason or you just can't find the app in the database. In this tutorial I will be installing the ultrasn0w deb since that is the specific tweak that Mason was having trouble with.
Step 1: Go into Cydia and search for "OpenSSH" and install it if you haven't yet. This will allow SSH connections between your phone and your iDevice(please note that the computer and the iPhone have to be on the same network in order for this to work, otherwise you need to forward ports and get your static IP and it gets a little more complicated).
Step 2: now that you have OpenSSH installed you are going to need to get a PC client in order to communicate with your device. IMO WinSCP is the best program for Windows, you can download it here
Step 3: Now you need to find the .deb file you want to install, this is pretty easy just go to Google and type in the name of the app you want to download and add "deb download" to the end of it. In this case I would type "ultrasn0w deb download" after you have downloaded the deb(Ultrasn0w 1.1-1 deb here), the best thing to do is rename it to something very short(you will see why in a little bit). The name of the file doesn't matter as long as it ends in the extension .deb I have renamed the ultrasn0w deb from ultrasn0w-1.1-1.deb to us.deb
Step 4: Open up WinSCP and the first screen you come up to is the login screen. Click "new" in the top-right and copy the information as seen below into your screen(you can find your iDevice's IP address by opening up SBSettings or by going into the wi-fi section under settings if you don't have sbsettings). Change the "Host name" to whatever your iDevice's IP address is. The username is "root" by default for all iDevices and the password is "alpine" you can and SHOULD change your SSH password but that's for a different tutorial. Now click "save" and name the connection and then connect. If you get a pop-up box when you connect this is normal just click the far left option.
Step 5: After you have connected you will see a directory of your iDevices filesystem. Navigate to private/var/tmp this is where you want to upload the deb that you just downloaded and renamed, so in the left column navigate to the folder where your .deb is saved and in the right column navigate to private/var/tmp and drag the deb from the left side into the right side to transfer it over to your device.
Step 6: Now that you have the deb on your iDevice in the tmp folder it is time to install it. This part is extremely easy once you've done it a few times(in fact, this whole process is extremely easy after you've done it a few times, I've gotten to the point where it takes me less than a minute from start to finish for this whole process). Click the little terminal-like icon directly under the "S" in the word "Session" on the top menu. This will open up a terminal window which should be familiar to mac users and will kind of resemble DOS for Windows users. Then all you do is type in the following command(Please note you have to have Cydia fully closed before executing this command):
dpkg -i /tmp/us.deb
This is where the shorter filename comes in handy. Many deb files will have prefixes or suffixes containing the name of the repo they came from and this just makes it a little easier to type in the command. Obviously if you are installing a different deb you would change the last part to reflect the filename of your deb. Your terminal screen should now look identical to how Cydia would look if you were installing through Cydia. When it says "setting up....." that's how you know it's done. Now just respring your device and the app will be installed just as if you did it through Cydia!
So that's about all I can think of right now, if any of this is unclear or you are having trouble please comment and let us know so we can try and get any issues resolved for you. Thanks!