stop ssh session after connection errors

This commit is contained in:
Eugene Pankov
2020-06-30 15:35:07 +02:00
parent 11c8ca6582
commit 21f33618d4

View File

@@ -105,6 +105,7 @@ export class SSHSession extends BaseSession {
this.shell = await this.openShellChannel({ x11: this.connection.x11 })
} catch (err) {
this.emitServiceMessage(colors.bgRed.black(' X ') + ` Remote rejected opening a shell channel: ${err}`)
return
}
this.shell.on('greeting', greeting => {