> On Mon, Apr 19, 2010 at 02:16:46PM +0100, Jannik Sundø wrote: >> I'm writing a script which will log into a list of servers if they >> have public/private keypairs set up. If a server doesn't, I want the >> script to move on to the next server rather than wait at a password >> prompt. >> >> I'm using this command: >> ssh root@IP -o PasswordAuthentication=no KbdInteractiveAuthentication=no Found elsewhere on the web and modified.... in bash, ( ssh root@IP -o PasswordAuthentication=no KbdInteractiveAuthentication=no ) & sleep 5 ; kill $! Assuming whatever you're doing on the list of servers will take 5 seconds to complete and continue.. if not, replace the 5 in the sleep with however long it will take to complete the task. If it hangs at a password prompt, it'll only hang for the sleep timer and then continue on.