Thanks for using Apple Support Communities.
From your post I understand your iPhone is in Recovery Mode, and whenever you try and restore it in iTunes, you get error 6. Please follow the steps outlined below to help resolve this error code.
Check your security software
Errors: 2, 4, 6, 9, 1611, 9006.
Sometimes security software can stop your device from communicating with either the Apple update server or with your device.
Check your security software and settings to make sure that they aren't blocking a connection to the Apple servers.
If you still see the error message, check for USB connection issues.

Check your USB connections
Errors: 13, 14, 1600, 1601, 1602, 1603, 1604, 1611, 1643-1650, 2000, 2001, 2002, 2005, 2006, 2009, 4005, 4013, 4014. You might also see a message that includes "invalid response."
If the USB connection between your device and computer is interrupted, you might not be able to update or restore.
To narrow down the issue, try different equipment:
If you still see the error message, check for hardware issues.

Check for hardware issues
Errors: 1, 3, 11, 12, 13, 14, 16, 20, 21, 23, 26, 27, 28, 29, 34, 35, 36, 37, 40, 53, 56, 1002, 1004, 1011, 1012, 1014, 1667, or 1669.
Your device or computer might have a hardware issue that stops the update or restore from completing.
- Check that your security software and settings aren't blocking your device from communicating with the Apple update server.
- Then try to restore your iOS device two more times while connected with a cable, computer, and network you know are good.
- Make sure that your security software and settings are allowing communication between your device and update servers.
- If you still see the error message when you update or restore, contact Apple support.
If you still see the error message, check for outdated or modified software.

Check for outdated or modified software
Errors: 1015. You might also see the message "The required resource can't be found."
These errors might appear if any of the situations below are true:
- Your version of iTunes is out of date. Get the latest version of iTunes, then try to update or restore again.
- Your device has a beta version of iOS.
- You're trying to install an earlier version of iOS (downgrading).
- Your device has unauthorized modifications to iOS, also called "jailbreaking."
Use recovery mode to restore your device to the latest version of iOS.
Take care.