docs: update the SSH_SERVER_HOST_KEYS default and generated keys (#566)

Since https://github.com/go-gitea/gitea/pull/33974 (1.27), `SSH_SERVER_HOST_KEYS` defaults to `ssh/gitea.rsa, ssh/gitea.ed25519, ssh/gitea.ecdsa, ssh/gogs.rsa`. When none of the keys exist, Gitea generates 4096 bit RSA, 256 bit ECDSA and ED25519 keys instead of RSA alone. This updates next, 28 and 1.27 in all three languages, matching https://github.com/go-gitea/gitea/pull/39500.

Written by Claude.

Reviewed-on: https://gitea.com/gitea/docs/pulls/566
Reviewed-by: Lunny Xiao <[email protected]>
Co-authored-by: silverwind <[email protected]>
This commit is contained in:
silverwind authored and silverwind committed 2026-09-30 23:34:35 +00:00
1 parent 7d9a82df8d
commit 4a0ef0480b
9 files changed
+9 -9

No files matched your search

@@ -367,7 +367,7 @@ aliases:
- `SSH_SERVER_CIPHERS`: **[email protected], aes128-ctr, aes192-ctr, aes256-ctr, [email protected], [email protected]**: 对于内置的 SSH 服务器,选择支持的 SSH 连接的加密方法,对于系统 SSH,此设置无效。
- `SSH_SERVER_KEY_EXCHANGES`: **curve25519-sha256, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group14-sha256, diffie-hellman-group14-sha1**: 对于内置 SSH 服务器,选择支持的 SSH 连接的密钥交换算法,对于系统 SSH,此设置无效。
- `SSH_SERVER_MACS`: **[email protected], hmac-sha2-256, hmac-sha1**: 对于内置 SSH 服务器,选择支持的 SSH 连接的 MAC 算法,对于系统 SSH,此设置无效。
- `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gogs.rsa**: 对于内置 SSH 服务器,选择要提供为主机密钥的密钥对。私钥应在 `SSH_SERVER_HOST_KEY` 中,公钥在 `SSH_SERVER_HOST_KEY.pub` 中。相对路径会相对于 `APP_DATA_PATH` 转为绝对路径。如果不存在密钥,将为您创建一个 4096 位的 RSA 密钥。
- `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gitea.ed25519, ssh/gitea.ecdsa, ssh/gogs.rsa**: 对于内置 SSH 服务器,选择要提供为主机密钥的密钥对。私钥应在 `SSH_SERVER_HOST_KEY` 中,公钥在 `SSH_SERVER_HOST_KEY.pub` 中。相对路径会相对于 `APP_DATA_PATH` 转为绝对路径。如果所有密钥都不存在,将为您创建 4096 位的 RSA、256 位的 ECDSA 和 ED25519 密钥。
- `SSH_KEY_TEST_PATH`: **/tmp**: 在使用 `ssh-keygen` 测试公共 SSH 密钥时要在其中创建临时文件的目录,默认为系统临时目录。
- `SSH_KEYGEN_PATH`: **_empty_**: 使用 `ssh-keygen` 解析公共 SSH 密钥。该值将传递给 shell。默认情况下,Gitea 会自行进行解析。
- `SSH_EXPOSE_ANONYMOUS`: **false**: 启用将 SSH 克隆 URL 暴露给匿名访问者,默认为 false。