Phase 1: Increase Argon2id to 128 MiB and add SSH agent forwarding

Argon2id:
- Increase memory parameter from 64 MiB to 128 MiB for stronger KDF

SSH Agent:
- Add agent.go with connectAgent(), agentAuthMethod(), requestAgentForwarding()
- Integrate agent auth into buildAuthMethods() (tried first when enabled)
- Set up agent forwarding after PTY allocation when agentForwarding is true
- Track and clean up agent socket connection on session close
- Add AgentAuth and AgentForwarding fields to SSHConfig model
- Add SSH Agent section to profile editor with toggle controls
This commit is contained in:
2026-04-16 00:00:00 +01:00
parent 6d300f7dba
commit 5a998aefb9
5 changed files with 124 additions and 1 deletions
+12
View File
@@ -390,6 +390,16 @@ class ProfileEditor {
}),
]));
// SSH Agent
sections.push(this._renderSection('SSH Agent', [
this._field('toggle', 'ssh.agentAuth', 'Use SSH Agent for Authentication', ssh.agentAuth, {
help: 'Authenticate using keys from the local SSH agent (ssh-agent)',
}),
this._field('toggle', 'ssh.agentForwarding', 'Forward Agent to Remote', ssh.agentForwarding, {
help: 'Allow the remote host to use your local SSH agent keys (equivalent to ssh -A)',
}),
], true));
// Advanced
sections.push(this._renderSection('Advanced', [
this._field('text', 'ssh.terminalType', 'Terminal Type', ssh.terminalType, { placeholder: 'xterm-256color' }),
@@ -896,6 +906,8 @@ class ProfileEditor {
p.ssh.keepaliveInterval = val('ssh.keepaliveInterval') ?? 30;
p.ssh.keepaliveCountMax = val('ssh.keepaliveCountMax') ?? 3;
p.ssh.compression = val('ssh.compression') || false;
p.ssh.agentAuth = val('ssh.agentAuth') || false;
p.ssh.agentForwarding = val('ssh.agentForwarding') || false;
p.ssh.startupCommand = val('ssh.startupCommand') || '';
const authStr = val('ssh.authMethods');