how to copy my *!&^%# log files

Bob Bell bbell at hp.com
Wed Jun 4 11:54:26 EDT 2003


On Tue, Jun 03, 2003 at 02:09:14PM -0400, Greg Rundlett <greg at buzgate.org> wrote:
> I can now issue commands like 
> 
> /usr/bin/scp joe at example.com:/usr/home/joe/www_logs/* /var/log/httpd
> 
> without supplying a password.  I can put it into a shell script and
> execute that script without a password.  

    It sounds like rather than creating a password-less key, you are
using ssh-agent so that you only need to enter the key once per login.
If so, good for you.  If not (i.e., your key has no password), I'm not
sure what's going on.

> WHY doesn't it work from cron as advertised?  I simply used crontab -e
> to put the right command in my crontab, but I'm getting authentication
> errors:

    When a command is run from cron, it runs in a different environment.
That is, it is not running from the same shell it which you are
successfully using ssh-agent to avoid entering a password.  I'm not sure
which method you are using for ssh-agent (spawning a subcommend or print
shell commands to configure the environment), but irrespective/
regardless (that's for Paul) of your choice, your cron job in all
likelihood does not have the environment setup to use ssh-agent.

-- 
Bob Bell <bbell at hp.com>
-------------------------------------------------------------------------
 "In theory, theory and practice are the same. 
  In practice, they are different."
   -- Larry McVoy



More information about the gnhlug-discuss mailing list