ssh sudo and btrfs send / receive - pam-settings missing?

This forum is for discussion about general software issues.

ssh sudo and btrfs send / receive - pam-settings missing?

Postby itcs » Sat Jun 26, 2021 5:55 pm

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?
itcs
 
Posts: 3
Joined: Sat Mar 09, 2019 8:42 am

Return to General

Who is online

Users browsing this forum: No registered users and 3 guests