3

O/S: Debian

Hi,

I've got multiple computers in a LAN network that I monitor remotely, they're all running the same hardware and software. To monitor them I simply ssh in to one computer and then ssh off that on to the others.

I was wondering if it was possible to send a command to the computers through ssh, that was then broadcast to the computers in the LAN (within a certain ip-range!)? e.g. For all the computers I want the command 'ls -l' to be run, from the ip range 10.1.1.10 - 10.1.1.18.

Or could I have them, e.g., to all run a bash script from one command? Is this possible or do I need some 3rd party program to implement this?

Thanks.

3

I think that PSSH is the tool you are looking for. See Execute commands simultaneously on multiple servers Using PSSH/Cluster SSH/Multixterm.

An alternative is DSH. See Running Remote Commands on Multiple Servers with SSH and Dsh.

You may also take a look at Puppet.

| improve this answer | |
0

First point would be you can have multiple terminals open to multiple SSH connections at once, but I assume you want a simple method of sending a single message to all machines at once.

There are a couple admin terminals which might help you here. I believe ClusterSSH (available through SourceForge) will do the job. You will have to forgive me, I have not personally tried this application, but have been told by others it allows for command echo across multiple systems. I assume this might be something you want. A brief look at the application can be found at linux.com

Hope this helps.

| improve this answer | |
  • Yes I've been opening up multiple terminal sessions. I will try ClusterSSH, thanks for your reply. – Caleb Fetzer Jan 27 '14 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.