agentos.guide › blog
In your Agent OS, hermes agent ssh is how one profile stops working on the machine that hosts the OS and starts working on a server you choose, with every shell command routed there over a reused SSH link.
This guide gives you a quick start, five prompts to paste into your agent, and a short weekly routine for keeping the remote side tidy.
Every key below comes from the official Hermes SSH backend reference.
If you'd like help deciding which profile should get a server, book a free SEO strategy session with my team.
Your Agent OS runs Hermes, a gateway and a set of profiles on one machine.
Each Hermes setup has a single terminal backend, and that backend decides where shell commands execute.
Leave it on local and the agent works on the OS machine itself.
Switch it to ssh and the agent's thinking, memory and tools stay put, while the commands travel to a remote box.
The tools page recommends this for security, because the agent can't alter its own code from the server.
Members of the AI Profit Boardroom get the installable Agent OS, so the gateway and profiles are already in place before you add a server.
hermes config set terminal.backend ssh on the Agent OS machine.~/.hermes/.env.The env file needs only two lines to begin:
TERMINAL_SSH_HOST=box.example.org
TERMINAL_SSH_USER=deploy
Add TERMINAL_SSH_PORT if your port isn't 22 and TERMINAL_SSH_KEY if you don't use the system default key.
Hermes dials with BatchMode=yes, so a server that still wants a password will refuse the connection.
Using your terminal tool, run hostname, whoami, pwd and uname -a.
Report each result on its own line.
Then tell me whether these match the server in TERMINAL_SSH_HOST
or the machine running Hermes, and stop without changing anything.
Compare the answer with !hostname typed straight into the CLI.
The CLI docs say bang commands always execute where Hermes is installed, so the two names should differ.
On the remote server, list the top-level folders under /var/www and /home,
show free disk space with df -h, and list running services.
Do not edit, delete or install anything.
Draft a short "allowed areas" list I can paste into future briefs.
Save the list it drafts into the profile's notes, then trim it by hand.
That list becomes the fence for every later job.
Keep it short and concrete: named folders, named services and the log files the agent may read.
Anything not on the list, such as databases or payment settings, should be treated as off limits until you add it yourself.
🔥 Want your Agent OS profiles, prompts and server setup pre-built?
Inside the AI Profit Boardroom you get step-by-step video trainings, the installable Agent OS with Hermes, four coaching calls a week and 3,600+ members running agents on their own servers.
Run these as three separate terminal calls:
1. cd /tmp and export OS_TEST=ok, and also set PLAIN_TEST=ok without export
2. print the current folder and both variables
3. tell me which values survived and why
With terminal.persistent_shell on, the default, the folder and the exported value should survive.
The plain variable shouldn't, and neither would an alias or a function.
The persistent shell docs explain the order of precedence: TERMINAL_SSH_PERSISTENT first, then the config key.
Container and cloud backends ignore both, so this prompt only behaves this way on SSH and local.
List the environment variables my installed skills declare as required.
On the remote server, print whether each one is set (yes or no only,
never print the value). For any that are missing, write the exact
AcceptEnv line I should add to /etc/ssh/sshd_config.
Hermes forwards those variables with OpenSSH SendEnv, so values stay out of the command text.
The server drops them quietly unless sshd_config has a matching AcceptEnv line, followed by a reload of sshd.
Your model provider keys are never forwarded, whatever the passthrough list says.
Create /tmp/agentos-ssh-test.conf with one line: mode=test.
Then change it to mode=live and show me the file.
Wait for me to type /rollback, then show the file again
so we can confirm the checkpoint restored it.
The checkpoints guide confirms rollback works on SSH, while Docker, Modal, Daytona and Vercel Sandbox record no checkpoints.
Run this once per new server before trusting the agent with real configuration files.
Remember that checkpoints cover the agent's own file writes, not the whole machine, so keep your normal server backups running alongside them.
| Backend | Commands land on | Approval check | Rollback |
|---|---|---|---|
| local | The Agent OS machine | On | Yes |
| ssh | Your remote server | On | Yes |
| docker | One persistent container per Hermes process | Off, container is the boundary | No |
| modal | A cloud sandbox VM | Off | No |
The approval column follows the security comparison in the Hermes docs.
The upshot for your OS: SSH is the only remote option that keeps both the approval check and rollback.
Choose Docker or Modal for a profile that experiments with untrusted code, and SSH for a profile that looks after a machine you already run.
Under the hood, Hermes holds one ControlMaster connection open for five idle minutes and snapshots the remote login environment once, so each command starts with the server's usual PATH.
📞 Not sure which profile should get a server?
Book a free SEO strategy session and my team will help you map profiles to machines.
Desktop has its own SSH route, and it does something else entirely.
It connects the app to a complete Hermes install on a server, rather than sending one agent's commands there.
Go to Settings → Gateways → Add connection, choose SSH and enter user@host:22; user and port are optional.
Per the multi-connection docs, the app opens the tunnel, launches the remote dashboard and adopts its token over that tunnel.
Since the v0.23.0 release, every registered gateway stays connected, and "New terminal on…" opens a shell on any SSH gateway.
For a full multi-machine layout, read the Hermes multi-gateway connections guide.
Every command the agent proposes on SSH lands on a machine you care about, so give the server profile a strong model.
The Hermes docs name no model for this backend.
The live Goldie Bench leaderboard is a quick way to shortlist, as long as you remember its tasks are one-shot builds rather than server work.
Shortlist two models, run Prompts 1 to 5 with each, and keep the one that asked for fewer needless approvals and read the logs correctly.
A cheaper model can still handle read-only reporting on a separate profile with a narrower login.
If SUDO_PASSWORD lives in the profile's env file, remember it is sent to the server, so keep it matched to the server's account.
Give a server to one profile first, ideally the one that already does maintenance work.
The SSH backend keeps approvals and rollback, so it fits the Agent OS habit of an agent that asks before it acts.
Keep the login user narrow, run the five prompts once per server, and widen access only after a clean week.
Bring your server plan to the AI Profit Boardroom calls if you want feedback from members already doing this.
The profile that already handles maintenance or deployment work, with a server login limited to the folders and services that job needs.
Ask it to run hostname through its terminal tool, then type !hostname in the CLI. The agent should name the server and the bang command should name the Agent OS machine.
Only exported variables and the working folder carry over with the persistent shell on. Plain variables, aliases and functions are lost on the next call.
No. Hermes never forwards provider credentials such as OPENAI_API_KEY over SSH, even if they appear in the passthrough list.
Yes. Checkpoints and /rollback work on the SSH backend, unlike Docker, Modal, Daytona or Vercel Sandbox.
No. The backend sends one agent's commands to a server; the Desktop SSH connection links the app to a whole Hermes install running on that server.
Paste Prompt 1 into your agent today, fence the server with Prompt 2 tomorrow, and if you want help with the rest, book a free SEO strategy session or bring it to the AI Profit Boardroom and run your own hermes agent ssh setup.
About Julian
I'm Julian Goldie, an AI entrepreneur, SEO expert and the founder of the AI Profit Boardroom, which has 3,400+ members.
I help business owners scale with AI agents, automation and SEO.
My YouTube channel has 400,000+ subscribers, and I run Goldie Agency, a seven-figure SEO agency.
→ Migrate Hermes Agent To New Machine In Your Agent OS
→ Hermes Webapp: Run Your Whole Agent OS From A Browser Tab, With Five Copy-Paste Prompts
→ Hermes Agent Kanban Orchestrator: Run It In Your Agent OS
The installable system behind every guide on this site — dashboard, agents, memory and pipelines — updated as new tools land, with 3,400+ members and four coaching calls a week.
Join the AI Profit Boardroom →📺 Video notes + links to the tools 👉
🎥 Learn how I make these videos 👉