ssh-restricted
Skill534 starsChanged 17 days agoMITView on GitHub
What to do when an ssh_* tool refuses to run: security modes (readonly, restricted) and human approval. Use when a command is denied, refused, or seems to hang waiting for something.
In this repository4 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- ssh-incidentSkill
- ssh-managerSkill
- ssh-operationsSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 38
Do not look for a way around it: Do not:
- Distinctive: line 43
ask the user to disable the mode so you can continue.
- Very specific: line 51
When a server is set to destructive or always approval, the engine pauses and asks a human before running.
- Distinctive: line 55
If it comes back "Refused by the operator", do not run a variation of the same command hoping it slips through.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When a server says no
MCP SSH Manager lets an operator constrain what an agent may do, per server. A refusal is the system working, not a bug to route around.
The three answers you can get
"Policy denied: Tool X is disabled (mode: readonly)" — the server is
read-only. Mutating tools (ssh_deploy, ssh_upload, ssh_execute_sudo,
ssh_backup_restore, ssh_db_import…) are off entirely. Reading still works.
"Policy denied: ... matches built-in destructive pattern" or "does not
match the allow patterns" — the server is restricted. The operator listed
what may run there, and this is not on the list.
"Refused by the operator" — a human saw the command in the control plane and said no. That is a person, not a rule.
What to do about it
Say what was refused and why, plainly. The operator configured this on purpose; they need to know their agent hit the wall, not that "something went wrong".
Offer the read-only equivalent. Refused systemctl restart nginx? You can
still ssh_service_status, ssh_tail the error log, and report what you found
along with the exact command a human would need to run. That is usually more
useful than the restart would have been.
Do not look for a way around it. Do not:
- retry the same thing through
ssh_executebecause the specific tool was blocked — the policy layer covers both; - reach for another server that is less constrained to do the same work;
- ask the user to disable the mode so you can continue. If they want it off, they will say so.
Working around a control someone deliberately put in place is worse than failing the task, because they will believe it held.
Approval, and waiting
When a server is set to destructive or always approval, the engine pauses and
asks a human before running. From your side the call simply takes longer — that
is expected, and it is what the operator wanted.
If it comes back "Refused by the operator", do not run a variation of the same command hoping it slips through. Report the refusal and ask what they would prefer instead.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

