auto ssghost key verification conf

This commit is contained in:
pomidorry
2026-05-17 01:59:44 +03:00
parent f7a5ac5cf2
commit 2ae1e055eb
3 changed files with 37 additions and 2 deletions
+8 -2
View File
@@ -11,9 +11,14 @@ var Migrations = struct {
BlockedDomains string
AllowLocalNetworks bool
SkipTLSVerify bool
// SSHHostKeyChecking controls StrictHostKeyChecking for SSH migrations/mirrors:
// "accept-new" (default, trust on first use, reject changed keys), "yes" (strict,
// host must already be known) or "no" (disable verification).
SSHHostKeyChecking string
}{
MaxAttempts: 3,
RetryBackoff: 3,
MaxAttempts: 3,
RetryBackoff: 3,
SSHHostKeyChecking: "accept-new",
}
func loadMigrationsFrom(rootCfg ConfigProvider) {
@@ -25,4 +30,5 @@ func loadMigrationsFrom(rootCfg ConfigProvider) {
Migrations.BlockedDomains = sec.Key("BLOCKED_DOMAINS").MustString("")
Migrations.AllowLocalNetworks = sec.Key("ALLOW_LOCALNETWORKS").MustBool(false)
Migrations.SkipTLSVerify = sec.Key("SKIP_TLS_VERIFY").MustBool(false)
Migrations.SSHHostKeyChecking = sec.Key("SSH_HOST_KEY_CHECKING").In("accept-new", []string{"accept-new", "yes", "no"})
}