How to Configure Copilot Studio SSH Credentials

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up copilot studio ssh credentials, link your agent to a custom connector or action. Then store the private key or password in a secure secret store for remote logins. Teams often build custom actions so bots can run scripts on Linux hosts. Still, sharing one static key across many bot tasks creates high risk. If a key has broad root rights, one bad prompt can break production servers. How copilot studio ssh credentials work in practice Copilot Studio does not open raw shell sessions on

Ephemeral Credentials + SSH Access Management: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

To set up copilot studio ssh credentials, link your agent to a custom connector or action. Then store the private key or password in a secure secret store for remote logins. Teams often build custom actions so bots can run scripts on Linux hosts. Still, sharing one static key across many bot tasks creates high risk. If a key has broad root rights, one bad prompt can break production servers.

How copilot studio ssh credentials work in practice

Copilot Studio does not open raw shell sessions on its own. Instead, teams link the bot to an external workflow or custom connector. That connector holds the login secret and talks to the target Linux machine. When a user asks the bot to check disk space, the bot triggers the connector. The connector then logs in to the remote host using a password or key pair.

Most teams start with standard public and private key pairs. An admin puts the public key on the Linux server. Then the admin saves the private key inside the connector settings. Some teams use OpenSSH certificates instead of static keys. OpenSSH 5.4 added support for signing keys with a Certificate Authority key. A signed certificate holds a public key, identity info, principal names, and login options. This format is much simpler than X.509 certificates used in web traffic.

Why static bot keys create security gaps

Native key setups solve the first step of server security. They prove the connector is allowed to log in to the Linux host. Using a Certificate Authority also helps teams avoid copying public keys to every server. Admins can sign a user key and list allowed user names as principals.

Still, login checks only decide who gets into the machine. Once the bot logs in, the Linux host trusts that user session completely. Static keys stay valid forever unless an admin revokes them or sets an expiry window. If the bot shares a service account, every action looks the same in system logs. You cannot tell which human user asked the bot to run a command.

Worse, native login settings do not inspect individual shell commands in flight. An agent might run a safe log check one minute and delete files the next. If a shell command prints customer emails or phone numbers, that raw text returns to the bot. Standard SSH daemon settings cannot mask sensitive fields like card numbers or national IDs inside command output.

Ephemeral Credentials + SSH Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Moving from broad shell keys to command controls

To keep servers safe, teams must separate login rights from command rights. Give the bot a restricted Linux account with minimal file permissions. Never let an automated agent log in as the root user. Restrict which commands the account can run on the target machine.

Teams should also stop storing long-lived private keys inside bot connectors. Short-lived credentials reduce the blast radius if a secret leaks. You also need clear audit logs that tie each shell command to a real person. Finally, filter command output so sensitive fields like emails get rewritten before reaching the chat window.

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

Can Copilot Studio log in to Linux servers directly?

No, the platform relies on custom connectors, cloud flows, or external tools to reach SSH hosts. Those helper tools hold the credentials and open the remote shell session.

Should I use passwords or keys for bot logins?

Keys or OpenSSH certificates are much safer than passwords for automated agents. Certificates let you set a clear validity window so access expires on time.

How do I stop a bot from running bad commands?

Use a least-privilege Linux user and limit allowed commands on the host. You can also add an approval step before high-risk shell commands run.

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.