Hi thad,

you might want to try the following (assuming the client
is from a trusted host):

- loop the ssh client command based on the number
 of  target host.
- write / copy (scp) the script to the destination host
 and directory.
- append the script on crontab.


loop:
  ssh [EMAIL PROTECTED] $command


* where $command:
"echo $bash_codes >> /cron.daily/script.sh "

or

"echo $bash_codes >> /destination/script.sh ;
echo * * * *  /destination/script.sh  >>  /etc/crontab"


if you're planning to script from a redmond-based
workstation, you can use the "plink.exe" from the
putty-suite of ssh clients. plink also allows the
series of remote commands to be read from a
test file.

plink.exe [EMAIL PROTECTED] -m commands.txt


HTH.




On 1/29/07, thad <[EMAIL PROTECTED]> wrote:
Hi list,

Can anybody provide a script or pointer, I have a bunch of hosts and I
need to add the crontab a  job schedule. What I want to do is a ssh
script that will edit cron for each trusted host and add the job
schedule.

Thanks in advance.

thad

_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to