Backup: borg-user on borg-server is not allowed to use borg

Hi Alex,

Thanks for jumping on my problem immediately :slight_smile:

@ljf, some more info:

Installing does give some warnings, no matter how I format the input.

Indicate the storage quota: 40G
Info: Installing application borgserver…
Warning: [WARN] Too many arguments ! "AAAAC3NzaC1lZDI1NTE5AAAAIMMhiUBJn" will be ignored.
Warning: [WARN] Too many arguments ! "/RqiRS23uMxzwExf0DOz/jq/Oulnx6Ac4b" will be ignored.
Warning: [WARN] Too many arguments ! "root@aa.tld" will be ignored.
Success! The SSOwat configuration has been generated
Success! Installation complete```

How is the resulting /home/user/.ssh/authorized_keys-line supposed to look like? I got one created by root while installing the borg-server end of the system, strictly fenced within a narrow set of permissions:
```# cat .ssh/authorized_keys.org
command="borg serve --storage-quota 50G --restrict-to-repository /home/onlineosbanl2/backup",no-pty,no-agent-forwarding,no-port-forwarding,no-X11-forwarding,no-user-rc ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHYQT0RgAzQNP6J5Rv7qBn50YuV734fODdHia1vubtVh root@online.osba.nl

Troubleshooting because I had no success running a backup:

  • Backup didn’t work out of the bo(rg)x
  • I tried whether keybased login worked, it didn’t
  • Tried ssh-copy-id, couldn’t because authorized_keys is owned by root on bb.tld
  • (Re)moved the authorized_keys file
  • Did a new ssh_copy_id
  • Still no luck with key based sign in
  • Debugging with ssh -vv showed that SSH tries to use id_ed… instead of id_borg_ed…, hence ssh -i
  • Renamed key from id_borg_ed25519 to id_ed25519
  • Success on login with the key
  • Backup runs until the actual archiving with borg

Looking back, I see that the fact that the hook gave an error might be the cause of the other points failing.

How to find out what is wrong with the hook?

Please let me know any debugging output that would help!