How to Configure Copilot Studio SSH Sandbox

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a copilot studio ssh sandbox by placing an isolated Linux host behind strict key rules. You then link your agent workflow to that host through a locked system account. Many teams start by giving the agent a standard user key on a test box. That wide role lets an automated workflow run any shell command or read local files. If a prompt goes wrong, the agent can break the host or leak private data. How a copilot studio ssh sandbox works with OpenSSH A safe sandbox starts with how the

SSH Access Management + AI Sandbox Environments: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up a copilot studio ssh sandbox by placing an isolated Linux host behind strict key rules. You then link your agent workflow to that host through a locked system account. Many teams start by giving the agent a standard user key on a test box. That wide role lets an automated workflow run any shell command or read local files. If a prompt goes wrong, the agent can break the host or leak private data.

How a copilot studio ssh sandbox works with OpenSSH

A safe sandbox starts with how the agent logs in to the remote Linux machine. Instead of static keys that last forever, teams can use OpenSSH certificates. In OpenSSH, a certificate authority key signs a public key to make a user certificate. Each certificate holds a public key, identity info, principal names, and signed options. This format is much simpler than X.509 certificates and arrived in OpenSSH 5.4.

Inside the Linux host, you create a dedicated low-privilege user account just for the agent. You map the certificate principal name to that single sandbox user account. You also lock down the Linux directories so the account can only read its own folder. Network firewall rules on the sandbox host should block outbound traffic to production systems. When the agent triggers an action, it opens an SSH session to run its task. Once the task finishes, the host closes the session and cleans up temporary files.

What native host controls solve and what they miss

Native OpenSSH settings and Linux user permissions solve the first part of the security problem. They control which machine or agent can log in to the sandbox host. They also keep the agent inside a specific user account on that single box. If someone steals a key, certificate limits and firewall rules help contain the blast radius.

Still, host login checks do not watch what happens after the session starts. Once the agent logs in, the SSH daemon lets it run any command allowed for that user. Native login controls cannot inspect individual shell commands in flight or pause risky actions for human approval. They also cannot mask sensitive text like emails, phone numbers, card numbers, or national IDs in output. If a command prints customer emails or card numbers, that raw text goes right back to the model. Teams also lack a clear log that ties each shell command back to a specific task.

SSH Access Management + AI Sandbox Environments: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Steps to harden the sandbox host for AI agents

First, remove sudo rights from the Linux user account that runs the agent commands. The agent should never have root powers, even inside a disposable test machine. Second, use signed OpenSSH user certificates instead of long-lived static public keys. Set a short validity window when signing the key so old certificates expire fast. By default, OpenSSH certificates stay valid forever unless you set a time limit.

Third, restrict what the SSH session can do by adding options to the certificate. You can block port forwarding so the agent cannot tunnel into other private networks. Fourth, wipe and rebuild the sandbox host on a regular schedule. Fresh hosts stop bad files or stray processes from sitting around between agent runs. Even with these host steps, you still need runtime controls over commands and returned data.

Check SSH commands and file transfers on the host

OpenSSH keys and certificates decide who can log into a Linux host. They do not check what a one-shot command or file transfer does once the session starts. With hoop.dev, you run an open-source SSH server with guardrails on the host. It checks callers with OpenSSH certificates and works with ssh, sftp, scp, and rsync clients.

When a caller runs a one-shot command or moves a file, hoop.dev guardrails check the command or path before it runs. Then hoop.dev data masking masks matched sensitive patterns in downloads and output. Interactive shells carry no guardrails because keystrokes have no statement boundary. Teams can turn interactive shells off and allow only commands and file tasks. The audit trail logs who connected and what was allowed or refused, without storing keystrokes or file bytes. See the source on GitHub.

Frequently asked questions

Why does an AI agent need an isolated SSH sandbox?

AI agents generate shell commands from user prompts, which makes their actions hard to predict. An isolated sandbox stops bad commands from breaking live servers or reaching private networks.

Should I use static SSH keys or OpenSSH certificates for the sandbox?

You should use OpenSSH user certificates signed by your certificate authority key. Certificates let you set a validity window and embed strict session options directly into the key.

Can Linux user permissions stop sensitive data from reaching the AI model?

Linux permissions only block access to whole files, not specific fields inside an allowed file. To rewrite emails, phone numbers, card numbers, or national IDs in results, you need runtime data masking.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.