Claude Desktop SSH: Connecting to Remote Tools
An SSH-based MCP server lets Claude Desktop call tools on a remote machine. Here is how to evaluate that connection, manage permissions carefully and keep your handoff record independent of the remote session.
Updated 5 min read
An SSH-based MCP server connects Claude Desktop to tools running on a remote machine. The desktop client spawns a local process that maintains an SSH connection and routes MCP calls across it. This is useful for running code, reading files or calling services on a server that is not your local machine.
Tools like fenbs keep approved task context and progress outside the remote session, so the record survives when the SSH connection closes or the session hands off to a different person.
How SSH tool access works with MCP
MCP (the Model Context Protocol) defines how an AI client calls outside tools. An SSH-based MCP server is a small program that runs on the remote host and exposes tools over that connection. The desktop app's config file lists the local command that establishes the connection and launches the server.
The connection path matters: the desktop client trusts the server process, and the server process acts with the permissions of the SSH user on the remote machine. If that user can delete production data, the MCP session can too, unless the server itself applies narrower limits.
There are two common connection patterns. In the first, the MCP server runs persistently on the remote host and Claude Desktop connects to it over an SSH tunnel. In the second, Claude Desktop spawns an SSH process that launches the server on demand. The on-demand pattern is simpler to set up and cleans up automatically when the session ends.
Remote permissions and trust boundaries
Before connecting Claude Desktop to a remote server over SSH, decide which actions the AI should be able to take on that machine. Create a dedicated SSH user with the minimum permissions the tools require. Do not connect as root or as an account with write access to systems the session does not need.
Scope the MCP server's tools to match those permissions. An MCP server that exposes only the commands you intend to use is safer than one that exposes a general shell. If the server runs arbitrary commands, the AI's tool calls have the same reach as an interactive SSH session.
Review the server's tool descriptions before connecting. Each tool should describe clearly what it does and what resources it can modify. Unclear descriptions make it harder to review an assistant's actions before they run. If a tool description is ambiguous, rewrite it before giving the assistant access.
Config setup in Claude Desktop
The Claude Desktop MCP config file lists each server under mcpServers. For an SSH-based server, the command is typically the SSH binary with the host, user and remote command as arguments, or a wrapper script that handles key management. See the MCP config guide for the JSON structure.
Use key-based authentication rather than password prompts. Claude Desktop spawns the server process without interactive input, so a password challenge will stall the connection. Store the key in a location the process can reach without user interaction.
Test the connection manually before adding it to Claude Desktop. Open a terminal and run the same SSH command with the same user and key. If it fails there, it will fail in the app too. Resolving authentication issues in a terminal is much easier than interpreting them from Claude Desktop logs. The MCP not working guide covers common startup errors once authentication is confirmed.
Keep the task context independent of the remote session
fenbs stores approved tasks, Decisions and rules, and Where we left off on its own server, not on the remote machine. If the SSH session drops or the server is unavailable, the project record is still there. Any connected assistant that picks up the work reads the same context the previous session left.
Create a free accountFree for one person · No credit card · Works with Claude, ChatGPT, Cursor and more
Auditing what the session did
When an AI assistant takes actions on a remote server, it is worth knowing what it did. Enable logging on the MCP server so each tool call is recorded with its arguments and result. Review those logs after a session, especially for the first few times you use a new tool.
Ask the assistant to summarize its actions before you close the session: which tools it called, which files it changed, which commands it ran. That summary belongs in your project record alongside the task, not only in the chat history.
Handoff across remote sessions
Remote sessions end. A server reboots, an SSH key rotates or a colleague takes over the work. If the only record of what was done lives in the chat history or a log on the server, the next person has to reconstruct it.
Before closing a session, ask the assistant to save Where we left off: which tasks it completed, what it checked, what remains and any issues it found on the remote machine. That summary travels with the project, not with the server.
How to do this with fenbs
- Create a free account and add your project in fenbs.
- Connect Claude Desktop to fenbs from Integrations. This gives the assistant access to your project context at the start of each session.
- Set up your SSH-based MCP server on the remote machine with a dedicated low-permission user. Test the SSH connection in a terminal first.
- Add the SSH server to the Claude Desktop config alongside the fenbs MCP connection. Record the SSH user, key location and permission decisions as Decisions in fenbs.
- Before ending a session, ask the assistant to save progress in fenbs: what it did on the remote machine, what it could not finish and where the next session should start.
fenbs does not manage SSH keys or remote server access. It keeps the project record that remote and local sessions share.