|
Secure Shell
Re: Returned post for secureshell (at) securityfocus (dot) com [email concealed] Apr 19 2010 01:16PM Jannik Sundø (jannik sundo sohonet co uk) (2 replies) Re: Returned post for secureshell (at) securityfocus (dot) com [email concealed] Apr 21 2010 08:18AM Salvador Fandino (sfandino yahoo com) Re: Returned post for secureshell (at) securityfocus (dot) com [email concealed] Apr 20 2010 01:44AM Derek Martin (code pizzashack org) (2 replies) Re: Returned post for secureshell (at) securityfocus (dot) com [email concealed] Apr 21 2010 12:12PM Jannik Sundø (jannik sundo sohonet co uk) |
|
Privacy Statement |
>> 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.
[ reply ]