In certain situations you might need to install ultrasn0w manually in your iPhone without using the wifi connection and Cydia through your iPhone.
Manually install Ultrasn0w to unlock your iPhone by following these steps:
1. Download Ultrasn0w 1.2 DEB (chose appropriate version of ultrasn0w)
2. SSH into your iPhone (or use iphone explorer / browser via usb )
3. Place the DEB file in var/root/Media/Cydia/AutoInstall (If Cydia/AutoInstall dont exist, create these folders)
4. Reboot the iPhone
5. Goto Cydia and make sure ultrasn0w is there (manage > packages)
6. Reboot iPhone again and your should now be unlocked!