Skip to content

Commit

Permalink
[supervisor] always allow gitpod user ssh (#19182)
Browse files Browse the repository at this point in the history
  • Loading branch information
iQQBot authored Dec 2, 2023
1 parent 7bcc749 commit 6d02689
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/supervisor/pkg/supervisor/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (s *sshServer) handleConn(ctx context.Context, conn net.Conn) {
args = append(args,
"-ieD", "-f/dev/null",
"-oProtocol 2",
"-oAllowUsers gitpod",
"-oPasswordAuthentication no",
"-oChallengeResponseAuthentication no",
"-oPermitRootLogin yes",
Expand Down Expand Up @@ -158,6 +159,7 @@ func (s *sshServer) handleConn(ctx context.Context, conn net.Conn) {

log.WithField("args", args).Debug("sshd flags")
cmd := exec.CommandContext(ctx, openssh, args...)
cmd = runAsGitpodUser(cmd)
cmd.Env = s.envvars
cmd.ExtraFiles = []*os.File{socketFD}
cmd.Stderr = os.Stderr
Expand Down

0 comments on commit 6d02689

Please sign in to comment.