Answer is from: stackoverfrow | How do I verify/check/test/validate my SSH password?
$ ssh-keygen -y -f <key file>
$ ssh-keygen -y -f my_key.pem
# correct password
Enter passphrase:
ssh-rsa AAAABBBBCCCCDDDDEEEEFFFF....
# wrong password
Enter passphrase:
Load key "/Users/evalphobia/.ssh/key.pem": incorrect passphrase supplied to decrypt private key
ssh-keygen has many feature…