If you are root, you can change anyone’s password by:
Wherein someuser is the user name of the account. It will prompt you to enter the new password twice.
If you are yourself and logged in with your own SSH account, you can also change your own password by simply:
It will also ask you to type your new password twice. Now you can log into your SSH with the new password.