[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

problem with ssh-agent when running rdiff-backup with cron



I've done a fair amount of searching on this, and I seem to just be
missing a small part in order to function correctly.

I have rdiff-backup installed and configured correctly. I have a simple
shell script placed in cron.daily with the following lines:

****BEGIN CODE****
#!/bin/bash
rdiff-backup --include-globbing-filelist /etc/backup.conf --exclude / /
syslogserver::/backups/presserver
rdiff-backup --remove-older-than 1M syslogserver::/backups/presserver
****END CODE****

I then setup ssh-agent to use RSA public keys for a passwordless login
to syslogserver from presserver. When I login as root to presserver,
this functions as intended. Also when logged in as root I can
successfully run the rdiffbackup script in cron.daily manually, and it
works as intended.

When I let cron run the script automatically, it fails with the
following message:

****BEGIN MESSAGE****
/etc/cron.daily/rdiff-backup:
Permission denied (publickey,keyboard-interactive).

Fatal Error: Truncated header string (problem probably originated
remotely)

Couldn't start up the remote connection by executing

    ssh -C syslogserver rdiff-backup --server

Remember that, under the default settings, rdiff-backup must be
installed in the PATH on the remote system.  See the man page for more
information on this.  This message may also be displayed if the remote
version of rdiff-backup is quite different from the local version
(0.13.4).
Permission denied (publickey,keyboard-interactive).

Fatal Error: Truncated header string (problem probably originated
remotely)

Couldn't start up the remote connection by executing

    ssh -C syslogserver rdiff-backup --server

Remember that, under the default settings, rdiff-backup must be
installed in the PATH on the remote system.  See the man page for more
information on this.  This message may also be displayed if the remote
version of rdiff-backup is quite different from the local version
(0.13.4).
run-parts: /etc/cron.daily/rdiff-backup exited with return code 1
****END MESSAGE****

It appears to me that the rdiffbackup script cannot login to
syslogserver when run from cron. I believe this to be something I have
setup incorrectly with ssh-agent. I welcome any suggestions that
anybody can offer.

Thank you,
Ryan Koski



Reply to: