[Firmware earlier than version 1.1.3 and using BSD Subsystem earlier than 2.0 can skip to the third step**.]
The supplied UNIX passwd command in BSD Subsystem is broken for firmware 1.1.3 and 1.1.4.
Attempting to change the password under firmware 1.1.3 or 1.1.4 will result in your device continuously rebooting.
(The reboot fix involves holding both the Power button and the 'Home' button down for at least 30 seconds, then [upon seeing a triangle icon], plugging the device into iTunes for restoration.)
What to do, what to do.
Ah-Ha! Replace the broken passwd command with the older, but working version...
iPhone / iTouch using firmware version 1.1.3 or 1.1.4, using BSD Subsystem 2.0, follow these steps:
First, download the older, but working unix passwd command.
Second, using, as always, CyberDuck; SSH** to your /usr/bin directory, and replace [drag and drop] the old cmd with the new one.
Now, click on the 'passwd' file in the CyberDuck window listing (to highlight it), then right-click and select 'Info' -verify the file permissions as (755). [all except group-write and others-write checked.]
Third, run Terminal, and type ssh root@youripaddress
When prompted, enter the default password alpine (Firmware prior to 1.1.3, has the password dottie )
Type passwd and press 'return'
Type your new password as directed.
Type exit and quit Terminal.
Fourth, push the 'Disconnect' button on CyberDuck, and reconnect again, using your new password.
Don't forget to turn the device's SSH OFF when done.