Today, I asked ChatGPT to clone a private GitHub repository onto an ageing iMac Pro sitting on our internal network.
It generated its own SSH key pair, authenticated with GitHub, cloned the repository and verified that the working tree was clean.
Nothing particularly remarkable for a software developer. Except that I hadn’t opened a terminal, given ChatGPT a password or exposed an SSH server to the internet.
And the technology making it possible was something we’ve been developing at Jadaptive for over two decades.
Giving AI access to real infrastructure
Much of the conversation around artificial intelligence in software development focuses on generating code. But generating code is only one part of a developer’s job.
Developers provision environments, manage repositories, install dependencies, run tests, investigate failures and interact with infrastructure.
For AI to become genuinely useful beyond code generation, it needs to be able to perform those tasks too.
The question is how we give it that capability without compromising the security of our infrastructure.
At Jadaptive, we’ve been working with SSH since the early 2000s. It’s a technology that provides the foundation for much of our software. With the emergence of the Model Context Protocol (MCP), we saw an opportunity to bring that technology into the world of AI agents.
What is an SSH MCP server?
The Model Context Protocol provides a standardised way for AI applications to discover and interact with external tools and services.
An SSH MCP server exposes SSH functionality through that protocol, allowing an AI application such as ChatGPT to establish SSH connections, interact with remote shells, transfer files and execute commands.
Rather than asking ChatGPT to generate a command for me to copy and paste into a terminal, I can give it the ability to execute that command itself and interpret the results.
Our Maverick SSH MCP server builds upon the same SSH technology that powers our commercial Java SSH products.
But exposing SSH functionality through MCP presents an interesting architectural challenge. How does a cloud-based AI application reach an MCP server running inside a private network?
Connecting ChatGPT without opening your firewall
One of the more interesting developments from OpenAI is Secure MCP Tunnel.
Traditionally, connecting an external service to an internal application might involve opening firewall ports, configuring a public reverse proxy or establishing some form of VPN connectivity.
Secure MCP Tunnel takes a different approach.
A lightweight tunnel client runs inside your network and communicates with OpenAI over an outbound HTTPS connection. It retrieves MCP requests, forwards them to your internal MCP server and returns the responses.
The MCP server itself does not require a publicly accessible endpoint.
Our architecture looks like this:

Both the Maverick MCP server and the OpenAI tunnel client run in Docker containers on our internal infrastructure. They communicate over a dedicated Docker network.
The development machine remains exactly where it has always been, on our private network.
Step 1: Deploy the SSH MCP server
Maverick SSH MCP is freely available as a Docker image. There is no registration, trial period or expiry.
First, create a Docker network that will allow the MCP server and the OpenAI tunnel client to communicate:
docker network create mcp-network
Generate a secure bearer token:
export MAVERICK_TOKEN=$(openssl rand -hex 32)
Then deploy the Maverick SSH MCP server:
docker run -d \
--name maverick-mcp \
--restart unless-stopped \
--network mcp-network \
-v maverick-mcp-data:/root/.sshteam-mcp \
-e MCP_TOKEN="${MAVERICK_TOKEN}" \
jadaptive/maverick-ssh-mcp:latest
The MCP server is now accessible to other containers on the same Docker network at:
http://maverick-mcp:7693/mcp
Notice that we haven’t published any ports on the Docker host. There is no need to expose the MCP endpoint outside the Docker network because the OpenAI tunnel client will provide the connectivity.
The Docker volume preserves the SSH Teams device registration and credentials across container upgrades and replacements. We will use SSH Teams to provide Just-In-Time SSH Certificate access to AI has no access to credentials.
Keep the generated bearer token somewhere secure. We’ll need it when configuring the tunnel client in the next step.
Further information is available from:
Step 2: Create an OpenAI Secure MCP Tunnel
With Maverick SSH MCP running inside our Docker network, we now need to establish a communication path between ChatGPT and our private infrastructure.
Log in to the OpenAI developer platform and navigate to the Tunnels section within your organisation settings.
Create a new tunnel and give it a descriptive name, such as Maverick SSH MCP.
Make a note of the tunnel ID, as we’ll need this when configuring the tunnel client.
Create a dedicated service account
Rather than using an existing API key, I created a dedicated service account with a restricted API key, granting only the following permissions:
- Tunnels: Read
- Tunnels: Use
There’s no reason for a connectivity component like this to have unrestricted access to an OpenAI organisation.
Deploy the tunnel client
We’re going to deploy the OpenAI tunnel client on the same Docker network we created in Step 1.
First, set the environment variables using the API key and tunnel ID obtained from the OpenAI developer platform:
export OPENAI_API_KEY="your-api-key"
export TUNNEL_ID="your-tunnel-id"
Make sure the MAVERICK_TOKEN environment variable from Step 1 is still available.
Create a file called docker-compose.yml with the following configuration:
services:
tunnel-client:
image: ghcr.io/openai/tunnel-client:latest
restart: unless-stopped
environment:
CONTROL_PLANE_API_KEY: ${OPENAI_API_KEY}
CONTROL_PLANE_TUNNEL_ID: ${TUNNEL_ID}
MCP_SERVER_URL: http://maverick-mcp:7693/mcp
MCP_OAUTH_DISCOVERY: "disabled"
MCP_EXTRA_HEADERS: "Authorization: Bearer ${MAVERICK_TOKEN}"
LOG_LEVEL: info
LOG_FORMAT: json
networks:
- mcp-network
networks:
mcp-network:
external: true
Start the tunnel client:
docker compose up -d
You can monitor its progress using:
docker compose logs -f tunnel-client
Once connected, the tunnel should be available within the OpenAI developer platform.
Understanding the configuration
There are two separate authentication mechanisms involved here.
The OpenAI API key authenticates the tunnel client with OpenAI’s infrastructure. The Maverick bearer token authenticates requests forwarded by the tunnel client to our internal MCP server.
The MCP_SERVER_URL uses the Maverick container name directly. Docker provides the DNS resolution between containers on the shared network.
Because Maverick uses bearer token authentication in this deployment, we disable OAuth discovery and configure the tunnel client to supply the appropriate authorisation header.
Neither container requires an inbound port to be exposed to the internet. The tunnel client establishes the outbound connection to OpenAI.
OpenAI provides further information in its Secure MCP Tunnel documentation and publishes the tunnel client source code on GitHub.
Step 3: Add the MCP server to ChatGPT
With Maverick SSH MCP running and our OpenAI tunnel established, we can now connect ChatGPT to our private infrastructure.
Unlike a conventional remote MCP server, we don’t need to provide ChatGPT with a publicly accessible URL. Instead, we’re going to use the tunnel we created in the previous step.
Create a custom MCP plugin
Open the ChatGPT Plugins page and select Add custom MCP server.
Configure the plugin as follows:
| Setting | Value |
|---|---|
| Name | Maverick SSH |
| Description | SSH connectivity and remote command execution using Maverick SSH MCP |
| Connection | Tunnel |
| Tunnel | Enter the tunnel ID obtained in Step 2 |
| Authentication | None |
Save the configuration to create the plugin.
ChatGPT will connect to the Maverick MCP server through the tunnel and discover the tools it provides.
Why are we selecting None for authentication?
This might seem counterintuitive in an article about secure connectivity, but we’re not removing authentication from the MCP server.
In Step 2, we configured the tunnel client to automatically include the Maverick bearer token in every request it forwards to our MCP server.
MCP_EXTRA_HEADERS: "Authorization: Bearer ${MAVERICK_TOKEN}"
Authentication is therefore handled by the tunnel client rather than ChatGPT directly.
Our MCP server remains protected by its bearer token and inaccessible from the public internet.
Test the connection
Start a new ChatGPT conversation and select the Maverick SSH plugin.
As an initial test, I asked ChatGPT:
What SSH capabilities are available to you through Maverick SSH?
ChatGPT can discover a range of SSH capabilities, including:
- Establishing and managing SSH connections.
- Executing remote commands.
- Interacting with remote shells.
- Transferring files using SFTP and SCP.
- Authenticating using SSH Teams certificates.
At this point, ChatGPT has access to the SSH tooling, but it still needs appropriate credentials to authenticate to our development machine.
That’s where SSH Teams comes in.
Step 4: Register Maverick with SSH Teams
We didn’t want to give ChatGPT a username and password for our development server. Nor did we want to distribute permanent private SSH keys for accessing our internal infrastructure.
Instead, we used SSH Teams, our centralised SSH certificate authentication technology.
Maverick SSH MCP exposes tools for registering itself as a managed SSH Teams device using the OAuth device authorisation flow. This means we can perform the entire registration process directly from our ChatGPT conversation.
Initiating device registration
With the Maverick SSH plugin enabled, I asked ChatGPT to register with our SSH Teams certificate authority:
Register your device against our SSH Teams server at <url>
ChatGPT invoked the registration tool and presented me with an interactive authorisation prompt, complete with a verification code and a button to authorise the device.

What I particularly liked about this interaction was that ChatGPT understood the authorisation process and presented an appropriate user interface rather than simply returning the raw output of the tool.
Authorising the device
Clicking the authorisation button took me directly to our SSH Teams server, where I could authenticate and approve the device registration.
This is an important security distinction. Authentication takes place directly with SSH Teams, outside of the AI conversation. ChatGPT never sees my credentials.
Completing registration
Having authorised the device, I returned to ChatGPT and simply said:
Done.
ChatGPT completed the OAuth device flow, verified the registration status and confirmed that Maverick now had a valid SSH Teams identity.

That’s the entire process. No terminal commands, no configuration files, no additional software and no credentials shared with the AI.
Maverick can now obtain short-lived SSH certificates from our certificate authority whenever it needs to authenticate to an authorised SSH server.
Naturally, the target SSH servers must already be configured to trust the SSH Teams certificate authority, and the registered identity must have the appropriate access permissions.
We’re now ready to make our first SSH connection.
Step 5: Make the first SSH connection
With everything configured, I asked ChatGPT to connect to the development machine.
Connect to my development server at development-mac.local as user coder. Confirm the connection by executing whoami, hostname and uname -sm.
It established an SSH connection using its SSH Teams identity, opened a shell and executed three simple commands:
whoami
hostname
uname -sm
The results confirmed that it was running under the dedicated coder account on our Intel-based iMac Pro.
coder
development-mac.local
Darwin x86_64
The hostname has been anonymised here, but the significance of those three lines was rather exciting.
ChatGPT was executing commands on a real machine inside our private network using our own SSH technology.
Beyond executing individual commands
One of the challenges with providing SSH access to an AI agent is managing the interaction with a remote shell.
SSH is fundamentally a communication protocol. Sending a command is straightforward, but determining when it has completed, interpreting its output and maintaining state across multiple commands requires additional functionality.
Maverick’s ExpectShell functionality provides a higher-level interface for interacting with remote shells.
This allows the AI to execute commands and receive their output without having to implement terminal handling and shell prompt detection itself.
ChatGPT used this functionality to inspect our development machine, identify its installed software, check available disk space and establish what was required to provision a new development environment.
Transferring files with SFTP
I was also interested in whether ChatGPT could retrieve files from the development machine without relying on shell commands.
Using Maverick’s SFTP capabilities, ChatGPT opened a file from our newly cloned repository, retrieved its contents and presented it to me as a downloadable file directly within our conversation.
No shell commands were involved.
This opens up some interesting possibilities for retrieving implementation reports, test results, log files and other development artefacts without having to leave the AI conversation.
From SSH access to a working development environment
Our development machine already runs a Jenkins agent, so I didn’t want the AI interfering with any of its existing infrastructure.
We gave it a separate operating system account, a dedicated workspace and its own Homebrew installation.
ChatGPT inspected the Java and Node.js versions, identified the required upgrades and started installing the dependencies for our new development environment.
We then created a dedicated GitHub machine account and granted it access to a single private repository.
ChatGPT generated a new ED25519 key pair on the development machine. I registered its public key with GitHub, and ChatGPT verified the GitHub host key and tested authentication.
Hi jadaptive-coder! You've successfully authenticated,
but GitHub does not provide shell access.
It then cloned the repository and verified the checkout.
The SSH key used for GitHub was separate from the SSH Teams identity used to authenticate to our development machine.
Throughout the process, I remained in the ChatGPT conversation. I made the decisions; the AI performed the work.
Access is not the same as authorisation
It’s tempting to look at what we’ve achieved and immediately start imagining AI agents managing production servers, deploying applications and performing maintenance tasks.
But there is a fundamental difference between giving an AI agent access to a machine and giving it permission to do anything on that machine.
Traditional SSH authentication determines whether an identity is permitted to establish a connection. Operating system permissions then determine what that identity can access.
For AI agents, I believe we need to go further.
Should an AI be allowed to inspect a log file? Probably.
Should it be allowed to restart a production service? Perhaps.
Should it be allowed to delete a database? Almost certainly not without explicit authorisation.
And those decisions should not be left entirely to the AI itself.
This is an area we’re exploring at Jadaptive through Command Intelligence, with the objective of introducing policy-driven control over the commands AI agents can execute.
Our aim is to establish an independently enforced security boundary rather than relying solely on instructions given to a language model.
What’s next?
Our next experiment is to install a dedicated AI coding agent on the development machine and have ChatGPT orchestrate the development process through Maverick.
Instead of moving between applications, copying specifications and pasting implementation reports, I want to manage the entire development lifecycle from a conversation.
Requirements, implementation, testing, review and approval.
There is still work to do, particularly around command authorisation, isolation and the management of long-running development tasks.
But today demonstrated something important.
The infrastructure required to connect AI agents to our existing systems is already taking shape. And much of it can be built upon security technologies that have served the software industry for decades.
SSH has been connecting people to machines for thirty years.
Now it’s connecting AI to them too.