STEP 1: First of all, you need a jailbroken device running iOS 4.2.1, so you can use our posted here to jailbreak iOS 4.2.1 on iOS devices using Redsn0w.
STEP 2: Download Cydia.patch file for iOS 4.2.1 from here and copy it to/Applications/Cydia.app/Cydia_ by SSH’ing into your iOS device (using the guide posted here to enable SSH on your iOS device).
STEP 3: Now type the following commands in terminal app on Mac OS X by using the original Cydia binary from here:
apt-get updateSTEP 4: Finally, reboot your device and enjoy Cydia on your device.
apt-get install bsdiff
cd/Applications/Cydia.app/
cp Cydia_ Cydia.bak
bspatch Cydia.bak Cydia_ Cydia.patch
chmod +x+s Cydia_
If you rely on unlock, it's recommended you stay away from Redsn0w as you will lose your unlock on your iOS device. From now on, you will need to boot using Redsn0w whenever your device is rebooted until comex make iOS 4.2.x jailbreak untethered. So, whenever you want to SSH into your device, you must first run your device in the “jailbroken state” on every reboot by using “Just boot tethered right now” option in Redsn0w. We'll be happy to answer your questions. [via Johnny iPhone]