scp works on command line, fails in cron

tonij67_at_hotmail.com
Date: 12/28/04


Date: 28 Dec 2004 06:58:18 -0800

Hi all,

I am a bit baffled here. I have set up public/private key
authentication many times and have not had the sort of problem I am
having now.

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

It copies the file /tmp/2 to /utils/backup on 10.46.0.102 with no
issue. 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

Any ideas why authentication works fine from the command line, but
gives the above error in cron?



Relevant Pages

  • Re: Scanning every hour
    ... please use a meaningful subject line of some sort. ... Check out cron and crontab. ... to put full pathnames in your script or command. ...
    (freebsd-questions)
  • Re: Cron Job
    ... If you mean the computer itself, put that command ... The standard 'cron' runs jobs at a specific time/date. ... Init or @reboot run jobs when ... Sunday night at 02:00) then copy the script and cron entry. ...
    (comp.os.linux.misc)
  • Re: Cygwin problem with cron and networked drives
    ... command line it is recognized. ... Is the cron job running on a linux system or an MS Windows system? ... versus the user running the cron job. ...
    (comp.os.linux.networking)
  • Re: Nmon scheduling question
    ... command ran first then in the script is the ps and kill command so it ... Vince this is a great script. ... Cron Job with pid: 135238 Failed ...
    (AIX-L)
  • Re: [SLE] rsync log
    ... If you type kcron you should get the ... What this means is the non-error output from a command like rsync prints ... the standard output of a cron job is emailed ... kcron is just a GIU way to specify your crontab ...
    (SuSE)