running ssh in crontab



Hello,

I want to run a script by crontab.
When I start toe script in a terminal window, it works pretty well. When I
try
to run it by a cron job, I get the message:
Usage: ssh [options] host [command]
triggered by the following line in the script:
ssh $SECHOST "cd /export/qip; tar xf trans.tar; rm /export/qip/named/*.jnl"
The variable SECHOST is set in the script (SECHOST=$HOSTNAME-sec).

How can I change the script to run it by a cron job?

Thanks in advance!
Best regards!
Andreas


The information contained in this e-mail message is privileged and
confidential and is for the exclusive use of the addressee. The person
who receives this message and who is not the addressee, one of his
employees or an agent entitled to hand it over to the addressee, is
informed that he may not use, disclose or reproduce the contents thereof.
_______________________________________________
sunmanagers mailing list
sunmanagers@xxxxxxxxxxxxxxx
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



Relevant Pages

  • Re: DBD::Oracle problem with bind_param_inout and UTF-8
    ... Consider the following script ... ... This email is intended solely for the use of the addressee and may ... If you receive this email in error please immediately notify the ... sender and delete the email. ...
    (perl.dbi.users)
  • RE: start http request and move on
    ... start http request and move on ... another script, call systemand place it in the background so you original ... but the personal views of the originator. ... addressee, any disclosure, reproduction, distribution or other ...
    (perl.beginners)
  • SUMMARY: running ssh in crontab
    ... I changes the definition of the varible SECHOST to SECHOST='hostname'-sec and ... When I start toe script in a terminal window, ... The information contained in this e-mail message is privileged and ... confidential and is for the exclusive use of the addressee. ...
    (SunManagers)
  • Quick Shell script question
    ... simple in a shell script. ... The command started off very complex but I created ... a test script to bring it down to it's most simple form and it still ... If you are not an addressee, any disclosure or copying of the ...
    (RedHat)
  • rlogin via expect mysteriously aborts when run from cron
    ... I'm not sure whether this is a problem related to shell, ... I have an application which, at some point, executes a zsh script. ... When investigating the output which was sent to me from the cron job ... I had one case where even a command ...
    (comp.lang.tcl)