Linked Questions
23 questions linked to/from Automatically run commands over SSH on many servers
5
votes
2
answers
33k
views
ssh to multiple hosts and run a command [duplicate]
How do I ssh into multiple hosts (e.g host1, host2, host3, etc) and cat /etc/fstab to generate report.txt?
3
votes
3
answers
86k
views
Script for login in multiple servers and execute commands and append output in one file [duplicate]
I got the task of logging into some 300 devices, execute the following commands and then copy the output into one file.
I can use SSH as a login method and I can give a predefined username and ...
4
votes
3
answers
21k
views
Running commands on multiple servers [duplicate]
I want to execute a process on multiple servers. I am using the following wrapper script. The script moves to servers one at a time. I would like to change it so it can execute on multiple servers. ...
1
vote
2
answers
8k
views
Execute command on multiple servers in parallel using a shell script [duplicate]
I have thousands of remote machines. I want to run some specific commands on all of them, but in parallel.
I use these commands which run sequentially:
for f in `cat host.lst`
do
./runScript.sh ...
1
vote
1
answer
9k
views
How to SSH to a list of network devices and execute a list of commands? [duplicate]
Does anyone know how to create a bash script that would SSH to a list of network devices, via IP addresses, and execute a list of commands?
The way I see this working is as follows:
List of IP ...
3
votes
1
answer
6k
views
Ssh to a box, run a command, output data to a file, then move on to the next IP adress [duplicate]
I want to run a script from my Jump server, have it SSH to a server, then run a command (like rm <file>, top or ls -lsa) then take that output and put it in to a file on my Jump server then move ...
1
vote
1
answer
4k
views
SSH into multiple servers executing multiple commands [duplicate]
I have several hosts that need to have a one-off RPM installed as well as packages belonging to the CentOS-Debuginfo.repo. These machines currently have the repo disabled and gpgcheck enabled. After ...
-1
votes
3
answers
4k
views
bash script to login to multiple Linux servers and collect the output of multiple commands through ssh [duplicate]
I need to login and collect output of below commands from multiple GNU/Linux servers through SSH. I have done password-less SSH authentication. I wanted to do this with bash script.
df -lh | awk '{if ...
0
votes
3
answers
2k
views
How to automate similar commands to multiple servers via SSH? [duplicate]
I have x servers that I can connect via SSH via passwords.
If I have to connect with only 1, I will ssh root@IPaddress. It will then ask for my password, and when authenticated, I can execute commands ...
0
votes
2
answers
1k
views
How to run a shell script on 10 hosts simultaneously? [duplicate]
Currently I am monitoring 10 hosts. I want to write a script which will calculate the disk space in every 24 hours and then if the file system of a host is critical for any host then it will move the ...
0
votes
1
answer
977
views
Script to SSH to multiple Linux Server and execute a find command [duplicate]
I need a script that can SSH to multiple servers and execute a find command to check when was the last time a file was created.
2
votes
2
answers
325
views
Increasing Productivity When SSH into Multiple Hosts [duplicate]
I work in operations and need to be able to log into multiple servers among a few hundred servers in a productive way. What I mean by productive is this: from the time from when someone asks me to ...
1
vote
0
answers
557
views
Log in to multiple remote servers and execute a script [duplicate]
I want to make a script that will remote login to the multiple servers listed in a txt file like
10.3.9.6
10.3.9.7
and all servers have same username and password.
and want to capture the output of ...
0
votes
1
answer
323
views
ssh multiple server for tar operation [duplicate]
I have a file containing IP address of 10 servers. e.g host.txt
I want to tar a directory and on 10 differents server from 1 server.
How can I run ssh parallel to those server which can reduce my ...
0
votes
1
answer
36
views
ssh root@$host.list < ./remotescript.sh [duplicate]
I'm using this command a lot to run a script on remote servers:
ssh [email protected] < ./remotescript.sh
It works quite well.
Now that there are more servers I'm wondering how I could use a list ...