There's a tool called cssh for linux that has simular use to what I'd like to have on Windows. Basically I'm logging into servers that are identical to each other and I'd like to be able to type the same thing in both windows at the same time to look at logs, do various greps, etc.
7 Answers
PuTTY Command Sender is what you're looking for.

- 19,620
- 5
- 57
- 75
-
I've used this, but it seems like one window has a definite lag... it's more noticeable when autocomplete is turned on. On one window, I get the autocompleted commands I expect, on the other I get just the letters I typed during autocomplete unless I go extremely slowly. Is this just me? – Alex Argo Aug 05 '10 at 13:59
-
The commands are sent in serial, not parallel I believe. It is working great for me to send the same commands to many boxes, but each happens one after the next. – Karl Henselin Feb 26 '18 at 18:17
You could always install clusterssh via CygWin (a UNIX compatible shell for Windows)... (you can google for more information about the two)...

- 1,201
- 8
- 20
I know this is an old question, but I found it because I've been using Putty Command Sender for about five years and always thought it was pretty terrible. I didn't use it enough to go looking for alternatives until now. Just came across puttyCluster -- https://github.com/mingbowan/puttyCluster -- and holy sht, it's unreal I've been wasting time with stupid Putty CS and it's inability to use maximized+"docked" windows.
Also found these alternatives, but haven't tried them: cputty clustershish (I don't have the rep to post more links, but just google them).

- 131
- 2
I have recently figure out a way to do this easily. I used an excel sheet to build cmd commands including putty ssh log-in then copy past the columns in a cmd window. it works like magic even if you have to customize the command for each server.
cmd Command ip user name password Command template
echo /snmp set enabled=yes >temp\10.10.0.9.txt| putty -ssh user_name@10.10.0.9 -pw passwd -m temp\10.10.0.9.txt 10.10.0.9 user_name passwd /snmp set enabled=yes
echo /snmp set enabled=yes >temp\10.10.0.31.txt| putty -ssh user_name2@10.10.0.31 -pw passwd2 -m temp\10.10.0.31.txt 10.10.0.31 user_name2 passwd2 /snmp set enabled=yes
if you want to run the exact command list on every machine then you save it to a file and use another sheet to generate the command-line batch.
cmd Command ip user name password
putty -ssh user_name@192.168.0.21 -pw paaswd -m commands.txt 192.168.0.21 user_name paaswd
putty -ssh user_name@192.168.0.22 -pw paaswd -m commands.txt 192.168.0.22 user_name paaswd
you will need to create a folder named temp inside putty main folder and you might need to customize putty logging to save a file per ip or pear session. this is my first post here so I cant upload images.
In addition to using clusterssh or mtputty, a simpile bash script can login to a list of remote servers using ssh, copy a file to each using scp and execute a script on each of the servers. I'm a bash scripting novice so likely not the most efficient or best option but seems to be pretty easy to manage. I've found it easier than both clusterssh and mtputty.
Save this code into a file named copyFileToServers.sh, create a serverlist file that has a list of ips or server names and execute by typeing ./copyFileToServers.sh
.
You'll need cygwin on windows (which is the only place i've tested this). You will have to install sshpass (i know people really hate this package but i was too lazy to get ssh keys going on all the servers) separately which can be downloaded from sourceforge.
One thing to note, you'll have to login using ssh user@remomte_server
from the command line of your admin machine for each server you want to manage. sshpass doesnt work until you have manually acknowledged adding the ssh key for the remote servers. You only need to do this once.
(note: I wasn't able to get clusterssh running on windows cygwin as of july 2014 so i couldn't really speak to how good/bad the program is at accomplishing what OP asked for.)
HOSTS=./serverlist
echo "what file should be copied to the remote servers?"
read file
echo "where should the file be placed on each remote server?"
read dest
echo "what script should be run on all remote nodes?"
read remoteScript
while read line
do
if [ "${#file}" -gt 0 ]
then
sshpass -p 'password' scp $file root@$line:$dest
else
echo "skipping file copy"
fi
if [ "${#remoteScript}" -gt 0 ]
then
sshpass -p 'password' ssh root@$line 'bash -s' < $remoteScript
else
echo "skipping remoteScript execution"
fi
echo $line
done < $HOSTS

- 10,644
- 29
- 93
- 146

- 11
- 1
If you are using Windows the easiest solution is MobaXterm multi-execution mode (aka MultiExec mode):
MobaXterm brings another really useful mode called "Multi-execution" mode.
This mode allows you to display all your terminals at the same time and to
write your commands to all of them at once: when you press a keyboard key,
it will write the same letters on all your terminals at once. This mode can
be activated by pressing the "MultiExec" button.

- 284
- 1
- 6
- 20