mcp-ssh-manager 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ All notable changes to MCP SSH Manager will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.4.1] - 2026-05-16
9
+
10
+ ### Fixed
11
+
12
+ - **SSH handshake failing against OpenSSH 9.x servers (Debian 12 / Ubuntu 24.04)** ([#32](https://github.com/bvisible/mcp-ssh-manager/pull/32) — thanks @YoungHong1992)
13
+ - The hardcoded algorithm list in `src/ssh-manager.js` was missing modern algorithms required by OpenSSH 9.x. The `ssh2` lib would fail the key-exchange phase against stock Debian 12 / Ubuntu 24.04 servers because no common KEX algorithm could be negotiated.
14
+ - **KEX** — added `curve25519-sha256`, `curve25519-sha256@libssh.org`, `diffie-hellman-group15-sha512`, `diffie-hellman-group16-sha512`. `curve25519-sha256` is now OpenSSH's preferred default since 6.5.
15
+ - **Server host key** — added `rsa-sha2-512` and `rsa-sha2-256` (RFC 8332). OpenSSH 8.2+ deprecates the SHA-1-based `ssh-rsa` signature algorithm in the default offer; without SHA-2 variants, RSA host keys could no longer be verified.
16
+ - **Cipher** — added `aes128-gcm@openssh.com` and `aes256-gcm@openssh.com` at the head of the list (preferred GCM variants on modern OpenSSH; the plain `aes*-gcm` names were already present but are not what OpenSSH advertises).
17
+ - **HMAC** — added `hmac-sha2-256-etm@openssh.com`, `hmac-sha2-512-etm@openssh.com`, `hmac-sha1-etm@openssh.com`. Encrypt-then-MAC is both faster and cryptographically stronger than encrypt-and-MAC; OpenSSH prefers ETM variants when both peers support them.
18
+ - **Fully backward-compatible** — every legacy algorithm previously in the list (`diffie-hellman-group14-sha1`, `ssh-rsa`, CBC ciphers, plain `hmac-sha*`) is preserved at lower preference. Connections to older servers (CentOS 7, Debian 10, AIX, network gear with legacy SSH stacks) continue to work unchanged.
19
+
8
20
  ## [3.4.0] - 2026-05-07
9
21
 
10
22
  ### Added
package/README.md CHANGED
@@ -6,7 +6,7 @@ A Model Context Protocol (MCP) server that enables **Claude Code** and **OpenAI
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/mcp-ssh-manager.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/mcp-ssh-manager)
8
8
  [![npm downloads](https://img.shields.io/npm/dt/mcp-ssh-manager.svg?style=for-the-badge&logo=npm)](https://www.npmjs.com/package/mcp-ssh-manager)
9
- [![Version](https://img.shields.io/badge/Version-3.4.0-brightgreen?style=for-the-badge)](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v3.4.0)
9
+ [![Version](https://img.shields.io/badge/Version-3.4.1-brightgreen?style=for-the-badge)](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v3.4.1)
10
10
  [![Claude Code](https://img.shields.io/badge/Claude_Code-Compatible-5A67D8?style=for-the-badge&logo=anthropic)](https://claude.ai/code)
11
11
  [![OpenAI Codex](https://img.shields.io/badge/OpenAI_Codex-Compatible-00A67E?style=for-the-badge&logo=openai)](https://openai.com/codex)
12
12
  [![MCP](https://img.shields.io/badge/MCP-Server-orange?style=for-the-badge)](https://modelcontextprotocol.io)
@@ -20,28 +20,30 @@ A Model Context Protocol (MCP) server that enables **Claude Code** and **OpenAI
20
20
 
21
21
  ---
22
22
 
23
- ## 🎉 What's New in v3.4.0
23
+ ## 🎉 What's New in v3.4.1
24
24
 
25
- **Full Windows OpenSSH support + shell-agnostic session sync** (Released: May 7, 2026)
25
+ **Modern OpenSSH 9.x compatibility** (Released: May 16, 2026)
26
26
 
27
- - **🪟 Windows OpenSSH targets — encoding & syntax fixes** ([#31](https://github.com/bvisible/mcp-ssh-manager/pull/31))
28
- - **Mojibake fix** — Commands on Windows hosts no longer inherit the OEM code page (CP950, CP932, CP1252…). Payloads are now wrapped as `powershell -NoProfile -OutputFormat Text -EncodedCommand <utf16le-base64>` (the same approach used by Ansible / Chef / Puppet for Windows remote execution), sidestepping every `cmd.exe` quoting and code-page issue
29
- - **`cd && ` syntax fix** — `cd ${workingDir} && ${cmd}` is invalid in `cmd.exe`; replaced with `Set-Location '${escapedDir}'; ${cmd}` (PowerShell-native, with `'` → `''` escaping) across `ssh_execute`, `ssh_execute_group`, and `ssh_execute_sudo`
30
- - Strictly gated behind `platform = "windows"` — Linux/macOS targets take the exact same code path as before, zero risk of regression
31
- - Thanks [@WenKingSu](https://github.com/WenKingSu) for the clean, well-documented patch
32
- - **🎯 Marker-based SSH session sync — replaces fragile prompt detection** ([#30](https://github.com/bvisible/mcp-ssh-manager/pull/30))
33
- - The previous `/[$#>]\s*$/` regex broke on custom prompts, ANSI color codes, multiline prompts, slow shells, `.bashrc` noise, AIX-style login flows — `ssh_session_start` would frequently fail with "Timeout waiting for shell prompt"
34
- - Now uses **UUID v4 markers** as protocol boundaries: each command is wrapped with a unique end marker (`set +e; <cmd>; __mcp_status=$?; printf '\n<marker>:%s\n' "$__mcp_status"`), and the PTY is opened with `ECHO: 0` so the buffer contains only command output
35
- - **Bonus**: sessions now report **real exit codes** captured from `$?` instead of the previous `!output.includes('command not found')` heuristic
36
- - Resolves [#20](https://github.com/bvisible/mcp-ssh-manager/issues/20) and supersedes the proposed configurable `prompt_pattern` approach by making the problem disappear entirely — no per-server config required
37
- - Thanks [@MakksSh](https://github.com/MakksSh) for the precise root-cause analysis and the clean refactor
27
+ - **🔐 Expanded SSH algorithm list — handshake against OpenSSH 9.x out of the box** ([#32](https://github.com/bvisible/mcp-ssh-manager/pull/32))
28
+ - The hardcoded algorithm list in `src/ssh-manager.js` was missing modern algorithms used by **OpenSSH 9.x** servers shipped with **Debian 12** and **Ubuntu 24.04**, causing the `ssh2` lib to fail the key-exchange phase against stock distributions
29
+ - **KEX**: added `curve25519-sha256` (+`@libssh.org`), `diffie-hellman-group15-sha512` and `diffie-hellman-group16-sha512`
30
+ - **Server host key**: added `rsa-sha2-512` and `rsa-sha2-256` (RFC 8332 — required since OpenSSH 8.2 deprecated `ssh-rsa` SHA-1 by default)
31
+ - **Cipher**: added `aes128-gcm@openssh.com` and `aes256-gcm@openssh.com` (preferred GCM variants on modern servers)
32
+ - **HMAC**: added `hmac-sha2-256-etm@openssh.com`, `hmac-sha2-512-etm@openssh.com`, `hmac-sha1-etm@openssh.com` (encrypt-then-MAC — both faster and cryptographically stronger than encrypt-and-MAC)
33
+ - **Backward-compatible by design** — all legacy algorithms (`diffie-hellman-group14-sha1`, `ssh-rsa`, CBC ciphers, plain `hmac-sha*`) are preserved at lower preference, so older servers (CentOS 7, Debian 10…) keep working unchanged
34
+ - Thanks [@YoungHong1992](https://github.com/YoungHong1992) for the well-scoped, well-ordered patch
38
35
 
39
- [Read full changelog →](CHANGELOG.md#340---2026-05-07)
36
+ [Read full changelog →](CHANGELOG.md#341---2026-05-16)
40
37
 
41
38
  ---
42
39
 
43
40
  ## Previous Releases
44
41
 
42
+ ### v3.4.0 - Windows OpenSSH support + shell-agnostic session sync (May 7, 2026)
43
+
44
+ - **🪟 Windows OpenSSH encoding & syntax fixes** — UTF-16LE base64 PowerShell payloads (Ansible-style) + `Set-Location` replacing `cd && ` ([#31](https://github.com/bvisible/mcp-ssh-manager/pull/31), thanks [@WenKingSu](https://github.com/WenKingSu))
45
+ - **🎯 Marker-based SSH session sync** — UUID v4 protocol boundaries with `ECHO: 0` PTY, real `$?` exit codes, no more "Timeout waiting for shell prompt" on custom/slow/AIX shells ([#30](https://github.com/bvisible/mcp-ssh-manager/pull/30), thanks [@MakksSh](https://github.com/MakksSh))
46
+
45
47
  ### v3.3.0 - ProxyCommand & Critical Fixes (May 2, 2026)
46
48
 
47
49
  - **🔌 ProxyCommand support** for SOCKS5 / custom proxy commands ([#24](https://github.com/bvisible/mcp-ssh-manager/pull/24))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-ssh-manager",
3
- "version": "3.4.0",
3
+ "version": "3.4.1",
4
4
  "description": "MCP SSH Manager: Model Context Protocol server for SSH remote server management. Control SSH connections from Claude Code and OpenAI Codex - execute commands, transfer files, database operations, backups, health monitoring, and DevOps automation. NEW: Tool activation system reduces context usage by 92%",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -42,12 +42,49 @@ class SSHManager {
42
42
  username: this.config.user,
43
43
  readyTimeout: 60000, // Increased from 20000 to 60000 for slow connections
44
44
  keepaliveInterval: 10000,
45
- // Add compatibility options for problematic servers
46
45
  algorithms: {
47
- kex: ['ecdh-sha2-nistp256', 'ecdh-sha2-nistp384', 'ecdh-sha2-nistp521', 'diffie-hellman-group-exchange-sha256', 'diffie-hellman-group14-sha256', 'diffie-hellman-group14-sha1'],
48
- cipher: ['aes128-ctr', 'aes192-ctr', 'aes256-ctr', 'aes128-gcm', 'aes256-gcm', 'aes128-cbc', 'aes192-cbc', 'aes256-cbc'],
49
- serverHostKey: ['ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'ssh-ed25519'],
50
- hmac: ['hmac-sha2-256', 'hmac-sha2-512', 'hmac-sha1']
46
+ kex: [
47
+ 'curve25519-sha256',
48
+ 'curve25519-sha256@libssh.org',
49
+ 'ecdh-sha2-nistp256',
50
+ 'ecdh-sha2-nistp384',
51
+ 'ecdh-sha2-nistp521',
52
+ 'diffie-hellman-group-exchange-sha256',
53
+ 'diffie-hellman-group16-sha512',
54
+ 'diffie-hellman-group15-sha512',
55
+ 'diffie-hellman-group14-sha256',
56
+ 'diffie-hellman-group-exchange-sha1',
57
+ 'diffie-hellman-group14-sha1',
58
+ ],
59
+ cipher: [
60
+ 'aes128-gcm@openssh.com',
61
+ 'aes256-gcm@openssh.com',
62
+ 'aes128-ctr',
63
+ 'aes192-ctr',
64
+ 'aes256-ctr',
65
+ 'aes128-gcm',
66
+ 'aes256-gcm',
67
+ 'aes128-cbc',
68
+ 'aes192-cbc',
69
+ 'aes256-cbc',
70
+ ],
71
+ serverHostKey: [
72
+ 'ecdsa-sha2-nistp256',
73
+ 'ecdsa-sha2-nistp384',
74
+ 'ecdsa-sha2-nistp521',
75
+ 'rsa-sha2-512',
76
+ 'rsa-sha2-256',
77
+ 'ssh-ed25519',
78
+ 'ssh-rsa',
79
+ ],
80
+ hmac: [
81
+ 'hmac-sha2-256-etm@openssh.com',
82
+ 'hmac-sha2-512-etm@openssh.com',
83
+ 'hmac-sha1-etm@openssh.com',
84
+ 'hmac-sha2-256',
85
+ 'hmac-sha2-512',
86
+ 'hmac-sha1',
87
+ ],
51
88
  },
52
89
  debug: (info) => {
53
90
  if (info.includes('Handshake') || info.includes('error')) {