vmstan / gravity-sync

💫 The easy way to synchronize the DNS configuration of two Pi-hole 5.x instances.
https://vmstan.com/gravity-sync/
GNU General Public License v3.0
2.29k stars 129 forks source link

Gravity Sync issue - Prompt for user password on every command #442

Closed CiscoKid08 closed 2 months ago

CiscoKid08 commented 5 months ago

Hi All,

Sorry for the idiot question but I'm sure there's something very simple I'm missing here... From both my primary and secondary dietpi's, I'm getting prompted for a password on each and every command that gravity-sync runs. This happens irrespective if I push or pull and ultimately, the whole process just times out and I'm not able to complete either action.

I can SSH successfully between both Pi's so I assume host key verification isn't the issue here.

Any suggestions?

root@Pihole1:~# gravity-sync pull
∞ Initializing Gravity Sync (4.0.7)
✓ Loading gravity-sync.conf
✓ Detecting local Pi-hole installation
root@192.168.10.6's password: tallation
✓ Detecting remote Pi-hole installation
root@192.168.10.6's password:
Permission denied, please try again.
root@192.168.10.6's password:
✓ Gravity Sync remote peer is configured
✓ Evaluating arguments: PULL
» Remote target root@192.168.10.6
✓ Validating pathways to Pi-hole
✓ Validating pathways to DNSMASQ
root@192.168.10.6's password: atabase
✓ Hashing the remote Gravity Database
✓ Comparing to the local Gravity Database
root@192.168.10.6's password:
root@192.168.10.6's password: ds
✓ Hashing the remote DNS Records
✓ Comparing to the local DNS Records
root@192.168.10.6's password:
! DNS CNAMEs not detected on the local Pi-hole
root@192.168.10.6's password:
^C^X^C^V^Z
[2]+  Stopped                 gravity-sync pull
CiscoKid08 commented 5 months ago

I wiped the /gravity-sync/ dir and re-ran gravity-sync config and everything is working again. Though if someone has some insight on what caused the issue, I'd love to know. - Thanks!

necromancyr commented 5 months ago

This is happening to me as well - can't figure out how to fix it and deleting the gravity-sync dir isn't fixing it.

necromancyr commented 5 months ago

Solved it. DietPi has Dropbear as it's SSH by default. Installing OpenSSH isn't sufficient, you need to change to use OpenSSH as your SSH setup as well (in the software menu of DietPi's config app). Once that's done, remove the old keys/config, redo, and you're good to go.

FastWReX commented 2 months ago

I just had that problem on my secondary PiHole. I used "gravity-sync purge", rebooted my Raspberry Pi Zero 2 W, and then reinstalled it on just that one.

vmstan commented 2 months ago

Effective July 26, 2024, this project has been retired. Thank you for your use and enthusiasm for a project that began as a few lines of bash in a Slack channel and envolved into something far more complex, and used by many thousands of Pi-hole enthusiasts over the last four years.