From 6d187e81178ef05cb2ca00217ecafa6b3db73e9f Mon Sep 17 00:00:00 2001 From: Jonathan Beverley Date: Wed, 26 Feb 2020 19:23:13 -0500 Subject: [PATCH] Add an option for Agent Forwarding I don't understand why this is on by default, let alone not configurable. Agent forwarding is a significant security concern, and buggy agent forwarding is the cause of a couple existing bugs. --- terminus-ssh/src/api.ts | 1 + .../src/components/editConnectionModal.component.pug | 5 +++++ terminus-ssh/src/services/ssh.service.ts | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/terminus-ssh/src/api.ts b/terminus-ssh/src/api.ts index d78d98ac..4bb9af20 100644 --- a/terminus-ssh/src/api.ts +++ b/terminus-ssh/src/api.ts @@ -36,6 +36,7 @@ export interface SSHConnection { skipBanner?: boolean disableDynamicTitle?: boolean jumpHost?: string + agentForward?: boolean algorithms?: {[t: string]: string[]} } diff --git a/terminus-ssh/src/components/editConnectionModal.component.pug b/terminus-ssh/src/components/editConnectionModal.component.pug index 6ba94a5a..d8f9b81c 100644 --- a/terminus-ssh/src/components/editConnectionModal.component.pug +++ b/terminus-ssh/src/components/editConnectionModal.component.pug @@ -82,6 +82,11 @@ .title X11 forwarding toggle([(ngModel)]='connection.x11') + .form-line + .header + .title Allow Agent Forwarding + toggle([(ngModel)]='connection.agentForward') + .form-line .header .title Tab color diff --git a/terminus-ssh/src/services/ssh.service.ts b/terminus-ssh/src/services/ssh.service.ts index a02543a8..f575087c 100644 --- a/terminus-ssh/src/services/ssh.service.ts +++ b/terminus-ssh/src/services/ssh.service.ts @@ -195,7 +195,7 @@ export class SSHService { privateKey: privateKey || undefined, tryKeyboard: true, agent: agent || undefined, - agentForward: !!agent, + agentForward: session.connection.agentForward && !!agent, keepaliveInterval: session.connection.keepaliveInterval, keepaliveCountMax: session.connection.keepaliveCountMax, readyTimeout: session.connection.readyTimeout,