Skip to content

Commit f3bbd46

Browse files
authored
don't append key file if asked not to (#13368)
1 parent 2ac112d commit f3bbd46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/ssh_key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ func CheckPublicKeyString(content string) (_ string, err error) {
362362
// appendAuthorizedKeysToFile appends new SSH keys' content to authorized_keys file.
363363
func appendAuthorizedKeysToFile(keys ...*PublicKey) error {
364364
// Don't need to rewrite this file if builtin SSH server is enabled.
365-
if setting.SSH.StartBuiltinServer {
365+
if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedKeysFile {
366366
return nil
367367
}
368368

0 commit comments

Comments
 (0)