How to Disable password prompt during ssh login with key failure
I wanted to login to a bunch of servers and test whether I could get in, or if I got error messages.
After messing around a while, I worked it into:
for n in `cat allhosts.txt`; do echo "host: ${n}"; ssh -oConnectTimeout=2 -oKbdInteractiveAuthentication=no -oPasswordAuthentication=no -oStrictHostKeyChecking=no -oChallengeResponseAuthentication=no myuser@${n} echo '----------'; done
No comments:
Post a Comment