diff --git a/terminus-ssh/src/api.ts b/terminus-ssh/src/api.ts index 38565aec..df8e53be 100644 --- a/terminus-ssh/src/api.ts +++ b/terminus-ssh/src/api.ts @@ -14,6 +14,9 @@ export interface SSHConnection { privateKey?: string group?: string scripts?: LoginScript[] + keepaliveInterval?: number + keepaliveCountMax?: number + readyTimeout?: number } export class SSHSession extends BaseSession { diff --git a/terminus-ssh/src/components/editConnectionModal.component.pug b/terminus-ssh/src/components/editConnectionModal.component.pug index ba99b909..7b300f81 100644 --- a/terminus-ssh/src/components/editConnectionModal.component.pug +++ b/terminus-ssh/src/components/editConnectionModal.component.pug @@ -58,6 +58,34 @@ button.btn.btn-secondary((click)='selectPrivateKey()') i.fa.fa-folder-open + ngb-tab(id='advanced') + ng-template(ngbTabTitle) + | Advanced Setting + ng-template(ngbTabContent) + .form-group + label Keep Alive Interval (Milliseconds) + input.form-control( + type='number', + placeholder='0', + [(ngModel)]='connection.keepaliveInterval', + ) + + .form-group + label Max Keep Alive Count + input.form-control( + type='number', + placeholder='3', + [(ngModel)]='connection.keepaliveCountMax', + ) + + .form-group + label Ready Timeout (Milliseconds) + input.form-control( + type='number', + placeholder='20000', + [(ngModel)]='connection.readyTimeout', + ) + ngb-tab(id='scripts') ng-template(ngbTabTitle) | Login Scripts diff --git a/terminus-ssh/src/services/ssh.service.ts b/terminus-ssh/src/services/ssh.service.ts index 657b63e4..8a49a924 100644 --- a/terminus-ssh/src/services/ssh.service.ts +++ b/terminus-ssh/src/services/ssh.service.ts @@ -110,6 +110,9 @@ export class SSHService { tryKeyboard: true, agent, agentForward: !!agent, + keepaliveInterval: connection.keepaliveInterval, + keepaliveCountMax: connection.keepaliveCountMax, + readyTimeout: connection.readyTimeout, }) let keychainPasswordUsed = false