- Support identity_file field in host configuration - Emit IdentityFile directives in SSH config - Remove legacy key requirement from legacy_infrastructure defaults - Modern keys (ed25519/rsa) used for all hosts - Legacy servers can be upgraded to modern keys as needed Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@@ -82,9 +82,12 @@ def host_block(aliases, hostname, user=None, port=None, extra=None): |
||
| 82 | 82 |
auth = (extra or {}).pop("auth", None)
|
| 83 | 83 |
proxy_jump = (extra or {}).pop("proxy_jump", None)
|
| 84 | 84 |
route = (extra or {}).pop("route", None)
|
| 85 |
+ identity_file = (extra or {}).pop("identity_file", None)
|
|
| 85 | 86 |
|
| 86 | 87 |
if route: |
| 87 | 88 |
lines.append(f" SetEnv SSH_ROUTE={route}")
|
| 89 |
+ if identity_file: |
|
| 90 |
+ lines.append(f" IdentityFile {identity_file}")
|
|
| 88 | 91 |
if auth == "password_interactive": |
| 89 | 92 |
lines.append(" SetEnv NG_SSH_AUTH=password-interactive")
|
| 90 | 93 |
lines.append(" BatchMode no")
|
@@ -198,6 +201,8 @@ def emit_hosts_for_group(data, group, target, defaults): |
||
| 198 | 201 |
extra["auth"] = item["auth"] |
| 199 | 202 |
if item.get("route"):
|
| 200 | 203 |
extra["route"] = item["route"] |
| 204 |
+ if item.get("identity_file"):
|
|
| 205 |
+ extra["identity_file"] = item["identity_file"] |
|
| 201 | 206 |
user = item.get("user")
|
| 202 | 207 |
port = item.get("port")
|
| 203 | 208 |
if company_managed_rule(data, target, aliases, user, port): |