diff --git a/lib/web/terminal.go b/lib/web/terminal.go index e5e6a4a455e58..011acfbe59855 100644 --- a/lib/web/terminal.go +++ b/lib/web/terminal.go @@ -494,16 +494,6 @@ func (t *TerminalHandler) streamTerminal(ws *websocket.Conn, tc *client.Teleport return } - // Check if remote process exited with error code, eg: RemoteCommandFailure (255). - if t.sshSession != nil { - if err := t.sshSession.Wait(); err != nil { - if exitErr, ok := err.(*ssh.ExitError); ok { - t.log.Warnf("Remote shell exited with error code: %v", exitErr.ExitStatus()) - return - } - } - } - // Send close envelope to web terminal upon exit without an error. envelope := &Envelope{ Version: defaults.WebsocketVersion,