I have a list of many servers. need to check (actually do some works on them) if the private key on the hand still can be used to login with SSH.
If I use ssh -i /path/to/private_key admin@server_host
. it will just hang there asking for password: admin@server_host's password:
What can I do to avoid this kind of hang, and collect info when private key is not applicable for this server?