ssh/tailssh: add envknobs to force override forwarding, sftp, pty

Updates tailscale/corp#15735

Change-Id: Ib1303406be925c3231ce7e0950a173ad12626492
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2023-11-09 13:14:00 -08:00
committed by Brad Fitzpatrick
parent ffabe5fe21
commit 53c4adc982
2 changed files with 27 additions and 1 deletions

View File

@@ -465,6 +465,12 @@ func (ss *sshSession) launchProcess() error {
ss.logf("starting non-pty command: %+v", cmd.Args)
return ss.startWithStdPipes()
}
if sshDisablePTY() {
ss.logf("pty support disabled by envknob")
return errors.New("pty support disabled by envknob")
}
ss.ptyReq = &ptyReq
pty, tty, err := ss.startWithPTY()
if err != nil {