Friends,
Need someone's help in helping me with the below requirement for a script:
> For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details <
I know, this is possible through expect programming in a simple shell script, but unfortunately I'm not able to get one to work as required. Below is what I could manage to write without expected results:
cat server_list
server1
server2
server3
..
..
..
cat for_loop.sh
for i in `cat server_list`
do
multibos -S
done
cat expect_script.sh
spawn /$HOME/for_loop.sh
expect "*User_ID*"
send "souvikm\r"
expect "*Password*"
send "passw0rd\r"
expect eof
$> ./expect_script.sh
Running the above written expect script doesn't solve my purpose - it does nothing Could someone help me rectify this script or help me with a better idea?
-- Souvik