If I remember correctly, changing your password involves modifying the file "master.passwd" located in /etc/ on your iPhone. To change it back, you'll need to replace master.passwd with the original file. PM me if you need it.
Since you can't login via SSH, you'll have to connect via USB to access your phone's files using something like DiskAid.
Glad you got it all figured out! Actually if your phone is jailbroken, Diskaid does allow root access. Just select "Root Folder" from the drop down menu (which is located at the bottom left-hand corner).