update_ssh_connection
Modify SSH connection settings like host, port, username, password, or private key path for secure remote access to Windows systems through the Windows CLI MCP Server.
Instructions
Update an existing SSH connection
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connectionId | No | ID of the SSH connection to update | |
| connectionConfig | No |
Implementation Reference
- src/utils/sshManager.ts:71-77 (handler)Core implementation of the update_ssh_connection tool logic: loads the server config, updates the specified SSH connection if it exists, and saves the config back to file.const updateSSHConnection = (connectionId: string, connectionConfig: any): void => { const config = loadConfig(); if (config.ssh.connections[connectionId]) { config.ssh.connections[connectionId] = connectionConfig; saveConfig(config); } };
- src/index.ts:840-852 (handler)MCP tool dispatch handler for 'update_ssh_connection': parses and validates arguments using Zod schema, calls the updateSSHConnection helper function, and returns success response.case 'update_ssh_connection': { const args = z.object({ connectionId: z.string(), connectionConfig: z.object({ host: z.string(), port: z.number(), username: z.string(), password: z.string().optional(), privateKeyPath: z.string().optional(), }) }).parse(request.params.arguments); updateSSHConnection(args.connectionId, args.connectionConfig); return { content: [{ type: 'text', text: 'SSH connection updated successfully.' }] };
- src/index.ts:474-507 (schema)Declarative input schema definition for the update_ssh_connection tool, used by MCP clients to validate tool calls.inputSchema: { type: "object", properties: { connectionId: { type: "string", description: "ID of the SSH connection to update" }, connectionConfig: { type: "object", properties: { host: { type: "string", description: "Host of the SSH connection" }, port: { type: "number", description: "Port of the SSH connection" }, username: { type: "string", description: "Username for the SSH connection" }, password: { type: "string", description: "Password for the SSH connection" }, privateKeyPath: { type: "string", description: "Path to the private key for the SSH connection" } }, required: ["connectionId", "connectionConfig"] } }
- src/index.ts:471-509 (registration)Tool registration in the MCP ListTools response, including name, description, and input schema for update_ssh_connection.{ name: "update_ssh_connection", description: "Update an existing SSH connection", inputSchema: { type: "object", properties: { connectionId: { type: "string", description: "ID of the SSH connection to update" }, connectionConfig: { type: "object", properties: { host: { type: "string", description: "Host of the SSH connection" }, port: { type: "number", description: "Port of the SSH connection" }, username: { type: "string", description: "Username for the SSH connection" }, password: { type: "string", description: "Password for the SSH connection" }, privateKeyPath: { type: "string", description: "Path to the private key for the SSH connection" } }, required: ["connectionId", "connectionConfig"] } } } },