Hello,
I have two similar boards running on archlinux with sdcards which I would like to "sync" from time to time by hand.
(Both running data on btrfs-filesystem.)
In addition there is on raspberry pi (currently running ubuntu) which is my central backup location with a classic sata-harddrive attached via usb.
If I send a filesystem snapshot from archlinux to the pi everything is working fine:
sudo sync
sudo btrfs send @filesystem_snapshot | sudo ssh -l pi 192.168.1.2 'sudo btrfs receive /mnt/snapshots/test/'
If I want to send in the other direction (e.g. to populate the other archlinux box with this data ... or in a backup-restore szenario):
sudo sync
sudo btrfs send @filesystem_snapshot | sudo ssh -l alarm 192.168.1.3 'sudo btrfs receive /mnt/snapshots/test/'
I hit an error:
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
If I add the -S option I get a second login prompt which is showing the typed-in password in clear and is not working and is having a tough timeout ...
I don't want to work with some sudo "NOPASSWD" commands or a pre-exchanged ssh-key.
I think adding some stuff in the pam.d settings might be the solution ... but as ubuntu and archlinux have not so similar approaches here I can not figure out what the pi has there what is missing on the arch boxes ...
None of the web resources which I found were talking about ssh sudo and some pam approach ... or is that a dead-end?