first commit
This commit is contained in:
28
scripts/ssh_loop.sh
Normal file
28
scripts/ssh_loop.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
FILE=$1
|
||||
|
||||
if [ $# -lt 1 ]
|
||||
then
|
||||
echo "Syntax: ./$(basename $0) <file name>"
|
||||
exit
|
||||
fi
|
||||
|
||||
for host in $(cat ${FILE})
|
||||
do
|
||||
|
||||
#scp bashrc root@$host:/etc/
|
||||
|
||||
#echo $IP
|
||||
|
||||
|
||||
#ssh -n admroy@$host "rm -rf /tmp/atlas/ && sh /root/atlas.sh init && /tmp/atlas/atlas.sh build && /tmp/atlas/atlas.sh purge && /tmp/atlas/atlas.sh install && hostname"
|
||||
ssh -n root@$host "hostname"
|
||||
#ssh -n root@$host "hostname"
|
||||
|
||||
#add to known hosts
|
||||
#ssh-keyscan -H $host >> ~/.ssh/known_hosts
|
||||
|
||||
done
|
||||
|
||||
#IPADDR="10.2.2."
|
Reference in New Issue
Block a user