Skip to content

Commit 132070d

Browse files
authored
[openssh] upgrade openssh to v9.8p1 (#19994)
* [openssh] upgrade openssh to v9.8p1 * update
1 parent 4dc8b36 commit 132070d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

components/supervisor/leeway.Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ COPY components-supervisor--app/supervisor \
3030
WORKDIR "/.supervisor/ssh"
3131
COPY components-supervisor-openssh--app/usr/sbin/sshd .
3232
COPY components-supervisor-openssh--app/usr/bin/ssh-keygen .
33+
COPY components-supervisor-openssh--app/usr/libexec/sshd-session .
3334

3435
COPY --from=docker_cli_builder /gp-docker/docker/docker /.supervisor/gitpod-docker-cli
3536

components/supervisor/openssh/leeway.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# This Dockerfile was taken from https://github.com/ep76/docker-openssh-static and adapted.
2323
FROM alpine:3.19 AS builder
2424

25-
ARG openssh_url=https://github.com/openssh/openssh-portable/archive/refs/tags/V_9_7_P1.tar.gz
25+
ARG openssh_url=https://github.com/openssh/openssh-portable/archive/refs/tags/V_9_8_P1.tar.gz
2626

2727
WORKDIR /build
2828

components/supervisor/pkg/supervisor/ssh.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ func (s *sshServer) handleConn(ctx context.Context, conn net.Conn) {
9999
if _, err := os.Stat(openssh); err != nil {
100100
return
101101
}
102+
sshdSession := filepath.Join(filepath.Dir(bin), "ssh", "sshd-session")
103+
if _, err := os.Stat(sshdSession); err != nil {
104+
sshdSession = ""
105+
}
102106

103107
var args []string
104108
args = append(args,
@@ -118,6 +122,9 @@ func (s *sshServer) handleConn(ctx context.Context, conn net.Conn) {
118122
"-oStrictModes no", // don't care for home directory and file permissions
119123
"-oTrustedUserCAKeys "+s.caPath,
120124
)
125+
if sshdSession != "" {
126+
args = append(args, "-oSshdSessionPath "+sshdSession)
127+
}
121128
// can be configured with gp env LOG_LEVEL=DEBUG to see SSH sessions/channels
122129
sshdLogLevel := "ERROR"
123130
switch log.Log.Logger.GetLevel() {

0 commit comments

Comments
 (0)