Skip to content

mod: improve compatibility for Xshell - #91

Open
zzmark wants to merge 3 commits into
buptczq:masterfrom
zzmark:xshell
Open

zzmark wants to merge 3 commits into
buptczq:masterfrom
zzmark:xshell

Conversation

@zzmark

@zzmark zzmark commented Oct 9, 2024

Copy link
Copy Markdown

Tested-by: Xshell 5(1339),Xshell 7(0164), Xshell 8(0057)

#89

Tested-by: Xshell 5(1339),Xshell 7(0164), Xshell 8(0057)
@boypt

boypt commented Oct 9, 2024

Copy link
Copy Markdown

Also tested :

  • Xshell 7 (Build 0170)
  • Xshell 8 Beta (Build 0051)
  • Xshell 8 (Build 0057)

@Zerek-Cheng

Zerek-Cheng commented Dec 3, 2024 •

Copy link
Copy Markdown

LGTM

Also tested :
· Xshell 8 (Build 0063)

From : #92

@boypt

boypt commented Nov 11, 2026

Copy link
Copy Markdown

XShell 8 build 0119 introduced an extended handshake layout for agent forwarding: the handshake frame now carries an extra field and a trailing key name after the cookie (e.g. desk-ed25519), producing a probe connection (a=28) that the old code rejected as invalid message length, causing XShell to close it and breaking forwarding (ssh_fetch_identitylist: communication with agent failed).

Fix: truncate initMsg.Cookie to initMsg.Length instead of erroring when extra trailing bytes are present. The reply already echoes initMsg.Flag (extra), which is what XShell expects (00000005 63 00000001).

A follow-up PR with this fix is available against @zzmark's branch (which already includes this PR #91): zzmark#2

fix: handle XShell 8 extended handshake (trailing key name) for agent forwarding
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants