Is the cron job being run by the same account as you're testing from
manually, or is running from, say, root?
The root account usually does (and should) have a more minimal path than
the non-privd accounts on systems, sometimes just /sbin and /usr/sbin or
something like that.
What if you explicitly put a path in the script? Or perhaps just
explicitly call out where things live (i.e. instead of "scp {blah}" do
"/usr/local/bin/scp {blah}".
- Rick
On Thu, 22 Mar 2001 [EMAIL PROTECTED] wrote:
> Hello,
>
> I am running SUN OS 2.6 and have loaded SSH2. Both the systems I am trying to
> talk to are Raptor Firewalls.
> I have allowed the firewall to run sshd (on the receiving system).
> I have run the key-gen and distributed my keys between the sending and receiving
> systems.
> >From the sending system, if I type; "ssh userid@ipaddress", I connect the the
> remote box without needing a password.
> >From the sending system, if I type; "scp /localfile
> userid@ipaddress:/remotedirectory" the file transfers to the receiving machine
> without any password needed.
> When I add the scp script to a cronjob, I receive the following error message
> upon execution;
>
> Executing ssh2 failed. Command:' ssh2 -l USERID -x -a -o passwordprompt %U@%H'
> s password: -o nodelay yes -o authenticationnotify yes IP_ADDRESS -s sftp' Syst
> em error message: 'No such file or directory'
> scp: warning: child process (ssh2) exited with code 255.
>
> I am totally lost at this point. It works manually but not as a cronjob. Have
> you ever seen anything like this before? Thank you
> for any help you can provide.
>
> - Matt Shultz
-------
Rick Carter, System Administrator, Physics Dept., University of Michigan
[EMAIL PROTECTED] Voice: (734) 764-3348 FAX: (734) 763-9694
For Physics computer support, please use [EMAIL PROTECTED]
"The man who sets out to carry a cat by its tail learns something that
will always be useful and which never will grow dim or doubtful."
-- Mark Twain