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