show ssh connection errors

This commit is contained in:
Eugene Pankov
2019-01-05 15:19:02 +01:00
parent deb99b0865
commit bcb6963c35

View File

@@ -117,6 +117,7 @@ export class SSHService {
agent = process.env.SSH_AUTH_SOCK agent = process.env.SSH_AUTH_SOCK
} }
try {
ssh.connect({ ssh.connect({
host: connection.host, host: connection.host,
port: connection.port || 22, port: connection.port || 22,
@@ -131,6 +132,9 @@ export class SSHService {
keepaliveCountMax: connection.keepaliveCountMax, keepaliveCountMax: connection.keepaliveCountMax,
readyTimeout: connection.readyTimeout, readyTimeout: connection.readyTimeout,
}) })
} catch (e) {
this.toastr.error(e.message)
}
let keychainPasswordUsed = false let keychainPasswordUsed = false