Re: scp works on command line, fails in cron

From: Frank_Hamersley (terabite_at_isat.bigpond.com)
Date: 12/29/04

  • Next message: Richard E. Silverman: "Re: scp works on command line, fails in cron"
    Date: Tue, 28 Dec 2004 23:49:12 GMT
    
    

    <tonij67@hotmail.com> wrote
    > I am testing a script that will be the framework for more complicated
    > tasks and the first test I want to run is a simple scp from one server
    > to another. I am starting very simple, no passphrase (yet) and am
    > already running into a wall. When I run this command:
    >
    > /usr/local/bin/scp /tmp/2 10.46.0.102:/utils/backup
    >
    > When I try to do the same thing from cron, I get an email from
    > cron with this:
    >
    > Permission denied, please try again.
    > Permission denied, please try again.
    > Permission denied (publickey,password,keyboard-interactive).
    > lost connection

    Can you pls post your crontab line (with suitable obfuscation of sensitive
    bits)?
    Also which shell are you using for your CLI?

    Cheers, Frank.


  • Next message: Richard E. Silverman: "Re: scp works on command line, fails in cron"

    Relevant Pages

    • SUMMARY: cron entry: nth day of every month?
      ... cron can not handle this with its own syntax. ... 21st but "command" only runs if the output of the "date" command ... What I would suggest is rather than embedding the logic in each script ... The answer is it is _not_ possible to control it only with crontab ...
      (Tru64-UNIX-Managers)
    • Re: Cron Jobs
      ... > having a cron will mean yo server is forced by the script ... > best than allowing mail dequeing by connection. ... > host server so I can get emails for my domain example.com. ...
      (RedHat)
    • Re: Problems with periodic scripts in jails [Cron <operator@sosai> /usr/libexec/save-entropy]
      ... >> If a cron job (eg, a shell script) doesn't perform whatever locking it ... it's not difficult to imagine cron kicking off the script ... > That's a good suggestion. ...
      (freebsd-current)
    • Re: Silent Cron Jobs
      ... afaik cron mails all output from a script. ... cronjob I usually dump all stdout ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
      (Debian-User)
    • Re: [SLE] Cron & wvdial
      ... That option under cron has disappeared. ... I used to get my mail from dialup via a bash script I wrote and called ... # Script to initiate a ppp connection. ... # I put most of the common options on this command. ...
      (SuSE)