Skip to content

Commit 6d02689

Browse files
authored
[supervisor] always allow gitpod user ssh (#19182)
1 parent 7bcc749 commit 6d02689

File tree

1 file changed

+2
-0
lines changed
  • components/supervisor/pkg/supervisor

1 file changed

+2
-0
lines changed

components/supervisor/pkg/supervisor/ssh.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ func (s *sshServer) handleConn(ctx context.Context, conn net.Conn) {
104104
args = append(args,
105105
"-ieD", "-f/dev/null",
106106
"-oProtocol 2",
107+
"-oAllowUsers gitpod",
107108
"-oPasswordAuthentication no",
108109
"-oChallengeResponseAuthentication no",
109110
"-oPermitRootLogin yes",
@@ -158,6 +159,7 @@ func (s *sshServer) handleConn(ctx context.Context, conn net.Conn) {
158159

159160
log.WithField("args", args).Debug("sshd flags")
160161
cmd := exec.CommandContext(ctx, openssh, args...)
162+
cmd = runAsGitpodUser(cmd)
161163
cmd.Env = s.envvars
162164
cmd.ExtraFiles = []*os.File{socketFD}
163165
cmd.Stderr = os.Stderr

0 commit comments

Comments
 (0)