Hello,
I have many servers and I am writing a script which allows me to upload it to the servers and perform some instructions like to install a program, etc. I use something like:
Code:
{
sudo ssh -T $host <<-EOF
wget -c $path/$file
bash $file
EOF
} 2>/dev/null
Where 'file' is a shell code with the proper instructions. Is there any possibility to scp file to a server and run it automatically since it's been uploaded? This will simplify and speed up the script's work cause I have too many servers: 500 or so.
Thank you.