BackupPC rsync failing because it is using the wrong SSH user

BackupPC rsync failing because it is using the wrong SSH user
Permission denied, please try again.
Permission denied, please try again.
[email protected]: Permission denied (publickey,password).
rsync_bpc: connection unexpectedly closed (0 bytes received so far) [Receiver]

I have ssh key set up for [email protected] and it works fine, but BackupPC keeps on using [email protected] to try to connect. This has been working for years, but broke after upgrading to BackupPC 4.

Is there any way to force the SSH user in the configs?

答案1

:facepalm:

https://backuppc.github.io/backuppc/BackupPC.html#Rsync-Rsyncd-Configuration

From the docs

$Conf{RsyncSshArgs} = ['-e', '$sshPath -l root'];

Ssh arguments for rsync to run ssh to connect to the client. Rather than permit root ssh on the client, it is more secure to just allow ssh via a low-privileged user, and use sudo in $Conf{RsyncClientPath}.

The setting should only have two entries: "-e" and everything else; don't add additional array elements.

This setting only matters if $Conf{XferMethod} = 'rsync'.

相关内容