To change the default or current password of the current users session via SSH or terminal you use the command passwd. Simply type in:
"passwd" and follow the onscreen prompts
to change the password.
To change for the Super-User or Root account, type in
"sudo passwd" and follow the onscreen prompts.
If you'd like to change a different Users password, log into Root or switch to it now by using the command: "su"
after logging into Root type the passwd command followed by the accounts username you wish to change: "passwd your_account_name" and follow the on screen prompts.