waveterm icon indicating copy to clipboard operation
waveterm copied to clipboard

[Feature]: Option to enable SSH Agent Forwarding within connection

Open jiahaodai22 opened this issue 2 months ago • 1 comments

Feature description

  • Platform: windows
  • Version: 0.13 beta latest
  • Status: SSH Agent and private key ready in keyring. Could able to login node with ssh-agent.
  • Problem: With powershell ssh tool could agent forward successfully. With waveterm connection could not do agent forard

Connection config:

  "vscode-server": {
    "conn:wshenabled": false,
    "display:order": 99,
    "ssh:hostname": "a.b.c.d",
    "ssh:port": "22",
    "ssh:user": "root",
    "term:fontsize": 12,
    "term:theme": "warmyellow"
  }

Result in Powershell:

PS > cat .ssh/config
Host a.b.c.d
  HostName a.b.c.d
  User root
  ForwardAgent yes
---
PS > ssh-add -L
ssh-ed25519 AAAAC3N... comment
---
PS > ssh a.b.c.d               
Last login: Fri Dec 26 18:43:59 2025 from 1.1.1.2
# env | grep -i auth
SSH_AUTH_SOCK=/tmp/ssh-XXXX87Snsg/agent.424931

Result in waveterm(with connection debug):

[conndebug] trying to connect to "vscode-server"...
[conndebug] connectInternal vscode-server
[conndebug] ConnectToClient vscode-server (jump:0)...
[conndebug] ssh dial a.b.c.d:22
[conndebug] successful ssh connection to a.b.c.d:22
[conndebug] normalized knownhosts address: [email protected]
[conndebug] running tryEnableWsh...
[conndebug] wsh settings enable:false ask:false
[conndebug] wsh not enabled: conn:wshenabled set to false
[conndebug] successfully connected (wsh:false)

[conndebug] ShellController.run() "22b5acdf-1546-4d58-b836-976e2b4ebda0"


[conndebug] ShellController.run() "22b5acdf-1546-4d58-b836-976e2b4ebda0"
[conndebug] DoRunShellCommand
[conndebug] resetTerminalState: resetting terminal state
[conndebug] remoteName: "vscode-server", connType: ssh, wshEnabled: false, shell: "", shellType: 
[conndebug] created swaptoken: 8b9e10ce-a614-4927-9787-531c7b27e421
Last login: Fri Dec 26 18:35:49 2025 from 1.1.1.2

(base) # env | grep -i auth
(base) # echo $?
(base) # 1

Implementation Suggestion

Waveterm should have a option to enable the ssh agent forward option.

Anything else?

No response

jiahaodai22 avatar Dec 26 '25 10:12 jiahaodai22