Script to Check for Unix/Linux Passwords

We have almost 100+ Unix/Linux servers, on which I have account.

Does anybody have a batch script which can do the following :

  • check if my password is correct
  • change my password

We use SFTP/SSH on Linux. The solution should force reading of password from command line. ( Passwordless methods will not work ).

tia.

Use expect and send command to interact with ssh.
Then it's just a matter of looping through each server, transmitting your current stored password to log in, then issuing a passwd command to change it to your new password.