There are multiple remote linux machines, and I need to write a shell script which will execute the same set of commands in each machine. (Including some sudo operations). How can this be done using shell scripting?
When ssh'ing to the remote machine, how to handle when it prompts for RSA fingerprint authentication.
I would like to know how to automate an already made shell script (all the steps of all the commands done on a specific folder) by utilizing a list (a .txt) of all folder names that the shell scripts goes and executes
In the working folder called main/ there are subfolders named folder1, folder2, folder3.....folder100 and shell script shell.sh.
I have made a shell script(/bin/sh) that starts a perl script (that I haven't made my self) that's starts a ssh session. The ssh session uses a private/public key to login so no password is needed. The Perl script works perfect.
But when I put it in a cronjob (crontab) the ssh connection asks for password. This makes the scripts fail. Seems like ssh keys are not working while running in cron.
I have a perl script that takes in 2 numerical values as ARGV.
perl script.pl parameter1 num1 num2
in my case I have 1000's of num1 and num2. I can have them in separate files. Please let me know how to automate this run using shell scripting or using awk, so that I don't have to enter all the values.