(bugfix) Use service-level known_hosts for generated SSH keys
When a selected SSH credential has no pinned known_hosts entries, create and use a pobsync service-level known_hosts file under POBSYNC_HOME/state. Pass UserKnownHostsFile and StrictHostKeyChecking=accept-new to SSH so unattended backups no longer depend on root's known_hosts or an interactive shell session. Keep pinned credential known_hosts behavior unchanged when entries are configured explicitly.
This commit is contained in:
@@ -69,8 +69,8 @@ def collect_host_checks(host: HostConfig, global_config: GlobalConfig | None = N
|
||||
SelfCheck(
|
||||
"Host known_hosts",
|
||||
"warning",
|
||||
"Selected credential has no known_hosts entries.",
|
||||
"Use Scan SSH host key before queueing unattended backups.",
|
||||
"Selected credential has no pinned known_hosts entries.",
|
||||
"pobsync will use service-level StrictHostKeyChecking=accept-new on first connect.",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user