Restoring backup fails to (properly) restore ssh key?

I'm struggling to configure my openwrt router the way I would like, so for every step I make I generate and download a backup archive. I commit the content to a git repo to keep track of what I'm doing and see what the effect changes in the UI result in the config file.

Since I'm playing around, I sometimes screw up and want to get back to a known state, so I restore the router to one of those archives using Luci.

While every configuration gets reset to what the backup contains, the router does not accept my SSH key anymore. If I visit Luci's "System --> Administration --> SSH-Keys" I can see my key there, but ssh still requires a password.

Even removing the key from the web interface and adding it back connecting through ssh still requires a password.

What could be wrong? Could it be a bug in the backup restore?

Thanks

/etc/sysupgrade.conf, add what is not being backed up, maybe:

/etc/ssl/private

Ok I think it's my fault.

The file /etc/dropbear/authorized_keys contains those keys, and it's being backed-up properly.

The issue is that the archive I create to be uploaded ignores permissions. I saw that in the logs (Status --> System Logs)

Mon Apr  1 17:20:01 2024 authpriv.info dropbear[2525]: /etc/dropbear must be owned by user or root, and not writable by others

Fixing permissions fixed this:

chown -R root:root /etc/dropbear/

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.