keypair check, handle password exception