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
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

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 => {