Bug #12640
closedproblem with ssh host key permissions after restore from backup, sshd fails to start
0%
Description
figured this should be on redmine, so this is a xpost from https://forum.netgate.com/topic/168618/22-01-problem-with-ssh-host-key-permissions-after-restore-from-backup-sshd-fails-to-start
I wanted a clean start today with the latest 22.01 beta, so I backed up my running config from 22.01.b.20211220.0600 and did a clean install of 21.05.2 to my 6100. Then, first thing I did after bootup was try to restore my config. Ouch, that completely nuked the system. GUI/php painted a bunch of errors (something about the encryption key length, not sure if it was SSH or the encrypted password it was complaining about, sorry I didn't take a screenshot...). Rendered the whole box inoperable though...even from console.
So I reformatted, and this time updated to 22.01 first before trying to restore my config. That worked (mostly). But I found I could no longer SSH into the system. I eventually noticed the warning that sshd was failing to start:
Log:
Looking at the perms from another system, it seems like both ssh_host_ed25519_key
and ssh_host_rsa_key
(private keys) should be chmod 600
—so I did that, and voila, ssh was back in business. This is a potential gotcha though, hope it can be fixed in time for 22.01
Related issues
Updated by Viktor Gurov almost 3 years ago
- Project changed from pfSense Plus to pfSense
- Category changed from Backup / Restore to Backup / Restore
- Target version deleted (
22.01) - Affected Plus Version deleted (
22.01) - Affected Version set to 2.6.0
Updated by Viktor Gurov almost 3 years ago
- Related to Bug #12637: Incorrect SSH key permission after restore added
Updated by Viktor Gurov almost 3 years ago
- Related to deleted (Bug #12637: Incorrect SSH key permission after restore)
Updated by Viktor Gurov almost 3 years ago
- Has duplicate Bug #12637: Incorrect SSH key permission after restore added