Skip to content

Commit e0bd6eb

Browse files
authored
Fix incorrect config argument position for builtin SSH server (#25341)
The "--config" option is a global option, it shouldn't appear at the end. Otherwise it might not be respected in some cases. Caught by #25330 and use a separate PR to fix it for 1.20
1 parent cc73f6e commit e0bd6eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/ssh/ssh.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ func sessionHandler(session ssh.Session) {
6868

6969
log.Trace("SSH: Payload: %v", command)
7070

71-
args := []string{"serv", "key-" + keyID, "--config=" + setting.CustomConf}
71+
args := []string{"--config=" + setting.CustomConf, "serv", "key-" + keyID}
7272
log.Trace("SSH: Arguments: %v", args)
7373

7474
ctx, cancel := context.WithCancel(session.Context())

0 commit comments

Comments
 (0)