B
birdboyee
Guest
Hello! We use a SecureCRT .vbs script to automate logging into multiple boxes, however, I'd like to have something run in Linux vs. our emulator. Below is my objective:
Our current .vbs script will look at an IP list .txt file on our PC, then login to each IP within the .txt, and execute the following:
Again, the script must prompt for root password (only once since all root PW's will be the same), and loop commands above for all IP's found on file. Can anyone help with this? Your assistance and cooperation is GREATLY appreciated!
Our current .vbs script will look at an IP list .txt file on our PC, then login to each IP within the .txt, and execute the following:
Code:
ssh router1@[IP Address]
su - root # We get prompted for PW.
su - secadmin2 # We do not get prompted for PW.
cd .ssh
cp authorized_keys authorized_keys_bkup
cat /app2/.ssh/Vkey >> authorized_keys
exit
exit
cd .ssh
cp Vkey Vkey.orig
cat Vkey >> authorized_keys
rm /app2/.ssh/Vkey
exit
Again, the script must prompt for root password (only once since all root PW's will be the same), and loop commands above for all IP's found on file. Can anyone help with this? Your assistance and cooperation is GREATLY appreciated!