Dear All In an environment , I have 20 centos servers running together . For shutting them down , I need to issue the followings on each of the servers : #./stopServer #init 0 This is cumbersome to try to issue these on huge amount of servers to keep them safely going shutdown. Can you please let me know how can I automate it and say let just one server send stop processes and shutdown commands to the other ones and then goes shutdown himself? Thank you
A simple script which loops though a text file that lists the hostname / username / password for the login and then runs the "shutdown - h now" command? Though, I would be uneasy with listing root passwords in a random text file.
On 11/17/2014 12:56 AM, Hadi Motamedi wrote:
Dear All In an environment , I have 20 centos servers running together . For shutting them down , I need to issue the followings on each of the servers : #./stopServer #init 0 This is cumbersome to try to issue these on huge amount of servers to keep them safely going shutdown. Can you please let me know how can I automate it and say let just one server send stop processes and shutdown commands to the other ones and then goes shutdown himself? Thank you _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
A simple script which loops though a text file that lists the hostname / username / password for the login and then runs the "shutdown - h now" command? Though, I would be uneasy with listing root passwords in a random text file.
Thank you for your help . So how to open a session with another server to login with root password and issue a command on it ?
Greetings,
On Mon, Nov 17, 2014 at 11:47 AM, Hadi Motamedi motamedi24@gmail.com wrote:
A simple script which loops though a text file that lists the hostname / username / password for the login and then runs the "shutdown - h now" command? Though, I would be uneasy with listing root passwords in a random text file.
Thank you for your help . So how to open a session with another server to login with root password and issue a command on it ?
Try cssh
Greetings,
On Mon, Nov 17, 2014 at 2:33 PM, Hadi Motamedi motamedi24@gmail.com wrote:
Try cssh
Thank you for your help. Is there any way to automate an ssh session on them say write a script to automatically ssh to them via root password and pass a command to them?
Please google for passwordless SSH authentication (Which many list members most likely will disapprove)
Request you to try something and post queries when it fails completely with error message etc.
http://www.firedaemon.com/blog/passwordless-root-ssh-public-key-authenticati...
http://www.itzgeek.com/how-tos/linux/centos-how-tos/password-less-login-ssh-...
You have been posting queries in this in other lists often without doing your homework.
and post a thanks if any solution works out for you as all the members here are voluntary contributors whi are sharing their valuable time and experience.
Please google for passwordless SSH authentication (Which many list members most likely will disapprove)
Request you to try something and post queries when it fails completely with error message etc.
http://www.firedaemon.com/blog/passwordless-root-ssh-public-key-authenticati...
http://www.itzgeek.com/how-tos/linux/centos-how-tos/password-less-login-ssh-...
You have been posting queries in this in other lists often without doing your homework.
and post a thanks if any solution works out for you as all the members here are voluntary contributors whi are sharing their valuable time and experience.
Thank you very much for your help. It solved my problem.
Am 17.11.2014 um 06:56 schrieb Hadi Motamedi:
Dear All In an environment , I have 20 centos servers running together . For shutting them down , I need to issue the followings on each of the servers : #./stopServer #init 0 This is cumbersome to try to issue these on huge amount of servers to keep them safely going shutdown. Can you please let me know how can I automate it and say let just one server send stop processes and shutdown commands to the other ones and then goes shutdown himself? Thank you
Try out ansible.
Using it you can automate many more tasks distributed over your server environment through very simple configurations. It is very flexible and powerful.
Alexander