Thanks for the info dude, What i did was i used Net SSH Perl module to login to server and check the connection (with keys).Need to do error handliing now :(
Thanks. King
--- Anurag anurag@hbcse.tifr.res.in wrote:
On Mon, 10 Jan 2005 20:16:10 -0800 (PST), "King" nightlife_king@yahoo.com said:
hi anurag,
Thanks for the code actually I wanted to have
a
script in perl or shell as i dont knw python. It
will
be something like this if the server is up work on
it
else goto next one in list.
Save this shell script and execute.
#!/bin/bash ssh -X foo.bar ssh -X server.home ssh -X something.nothing ssh -X gnu.hbcse
This will try to connect to your ssh servers in that order. If it connects then it will ask for your password. You can enable public key authentication for use with ssh so that it does not ask for any password and uses your public key instead.
Generate ssh keys and copy them to ~/.ssh/ directory of server. then sign your key using: $ ssh-agent > /tmp/f $ source /tmp/f $ ssh-add
-Anurag
--
__ __
gnu /noo/ n. Ox like antelope; (abbr.) /gnoo/ n. (recursive acronym) Gnu's Not Unix.
__________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250