bash - How can I run a quick script on lots of remote servers? -


i need restart apache on dozen servers. can log each 1 , or can have 1 script on first 1 me. can me out?

server 1 has access other servers through known hosts.

manually can run this:

ssh user@server2 service httpd restart exit  ...  ssh user@server100 service httpd restart exit 

how can script run server 1 restart servers?

for in $(seq 2 100) ;      ssh user@server$i 'service httpd restart' ; done 

Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -