Another requirements to apply is your iPhone 3GS must have been previously jailbroken using one of these jailbreaking tools: BlackRa1n, Redsn0w, PwnageTool or the Sn0wbreeze. And then you have to install OpenSSH manually to make you able on installing anything on Cydia latter, the reason installing OpenSSH manually because currently Cydia doesn't support iOS 4.2. Here are the download links:
1. Make sure you have installed the latest iTunes
2. Grab the latest version of firmware, which is iOS 4.2 Beta for iPhone 3GS via this link (Developers Only).
3. Get the PwnageTool 4.01 via this link
4. Now it's time to download PwnageTool bundle from here, once it's downloaded, you need to extract it.
5. Grab all the files and put them on desktop.
6. Simply copy the PwnageTool you have already downloaded at step 3 by right-clicking and then click "Show Package Contents" option, see the following image for example:
7.Go to Contents/Resources/FirmwareBundles/ and paste the following file iPhone2,1_4.2_8C5091e.bundle inside this location and then close the folder afterward
8. Now run PwnageTool, then select iPhone 3GS with iOS 4.2.
9. PwnageTool will detect the iOS 4.2 firmware and then move forward. You will be seeing the PwnageTool is detecting iOS 4.2 on this phase. And it will eventually ask you this question: "Do you have an iPhone contract that would activate normally through iTunes", answer it "No" you don't have the official carrier support - answer it "Yes" if you are supported with any carrier such as AT&T & your baseband will be updated to the latest version. Then, our PwnageTool will continue the process of creating the .ipsw file.
10. "ihaz Success!" notification will appear as the sign that .ipsw file is being created successfully!
11. Launch the iTunes to select the iPhone 3GS in it (look at the phone icon on the sidebar of iTunes).
12. And on your keyboard hold "shift" key (for Windows) and hold "alt" for Mac.
This will make iTunes prompt you to select the location for your custom firmware 4.2 file. Select the required custom .ipsw file and click on “Open”.
13. Browse to the iOS 4.2 .ipsw file that PwnageTool cooked earlier and let iTunes do the rest of the iPhone 3GS iOS 4.2 jailbreak process. After the process is finished, your phone will automatically reboot and it will be jailbroken on iOS 4.2.
13. Let the iTunes do the rest of the job on installing the new firmware 4.2 on your iPhone 3GS. Just wait till the process entirely finished. Once the installation fully completed your iPhone 3GS will do the automatic restart. Then you will have a jailbroken iPhone 3gs on iOS 4.2
Follow the link in case you decided to downgrade your current iOS 4.2 to iOS 4.1, 4.0.1 firmware!