1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-25 11:33:35 +03:00

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,20 +117,24 @@ export class SSHService {
agent = process.env.SSH_AUTH_SOCK
}
ssh.connect({
host: connection.host,
port: connection.port || 22,
username: connection.user,
password: connection.privateKey ? undefined : '',
privateKey,
passphrase: privateKeyPassphrase,
tryKeyboard: true,
agent,
agentForward: !!agent,
keepaliveInterval: connection.keepaliveInterval,
keepaliveCountMax: connection.keepaliveCountMax,
readyTimeout: connection.readyTimeout,
})
try {
ssh.connect({
host: connection.host,
port: connection.port || 22,
username: connection.user,
password: connection.privateKey ? undefined : '',
privateKey,
passphrase: privateKeyPassphrase,
tryKeyboard: true,
agent,
agentForward: !!agent,
keepaliveInterval: connection.keepaliveInterval,
keepaliveCountMax: connection.keepaliveCountMax,
readyTimeout: connection.readyTimeout,
})
} catch (e) {
this.toastr.error(e.message)
}
let keychainPasswordUsed = false