![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shutdown script | kingsto88 | HP-UX | 0 | 03-20-2007 08:43 PM |
| A script for shutdown | kelu | UNIX for Dummies Questions & Answers | 12 | 08-23-2006 09:09 PM |
| I need a Script to rsh multiple hp boxes and shutdown | blackfam972 | Shell Programming and Scripting | 2 | 05-09-2006 11:59 AM |
| Shutdown script | alpha_manic | UNIX for Advanced & Expert Users | 10 | 09-14-2005 04:14 PM |
| logout/shutdown script | ropers | UNIX for Dummies Questions & Answers | 1 | 08-02-2002 02:05 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Multiple ssh, shutdown and exit script
PROBLEM:
I need to ssh into multiple remote machines, send a shutdown command and exit. The remote servers will then run their own scripts to gracefully shutdown their applications before shutting down. ONE: This is to be achieved without using public key authentication; this is being avoided as a security measure. (Not negotiable) :-) TWO: Passwords are required. SO FAR: I wrote an expect script that ssh's into the remote server, and calls on a script. Trouble is the expect script on the "master" server waits for the remote script to complete before exiting,thus time is wasted (I am trying to shut down several servers within a certain time). Is there a way to run multiple instances of my expect script simultaneously, or /and is there another way to do this. If sequentially, then in the shortest time possible. Thanks!!! |
|
|||||
|
Quote:
Seriously, create a listening daemon each server that responds only to a specific IP address, and if really necessary, a password string. Once the string has been received, issue the shutdown command. It's a 5 line perl program. No need to parallelize since the string is sent and your client script just goes to the next server. |
| Sponsored Links | ||
|
|