How to Configure GitHub Copilot SSH Audit Log
You set up a github copilot ssh audit log by combining OpenSSH server logs with signed user certificates. You also enable local terminal tracking in your code editor to record every agent action. Many teams let coding agents use standard developer keys on remote hosts. This practice creates a major blind spot for security teams. When an agent runs a bad command, the server log only shows the human user. Broad host permissions let an automated assistant change files or read secrets across the who
Audit Log Integrity + SSH Access Management: the complete guide
Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.
You set up a github copilot ssh audit log by combining OpenSSH server logs with signed user certificates. You also enable local terminal tracking in your code editor to record every agent action. Many teams let coding agents use standard developer keys on remote hosts. This practice creates a major blind spot for security teams. When an agent runs a bad command, the server log only shows the human user. Broad host permissions let an automated assistant change files or read secrets across the whole machine. Teams need clear records that link every remote shell command back to the tool that ran it.
How a native github copilot ssh audit log works
GitHub Copilot runs inside your code editor and can execute local shell commands in agent mode. When a developer asks the assistant to check a remote host, the editor opens a local terminal. That terminal uses the local OpenSSH client to log in to the remote Linux machine. By default, the local client uses whatever private key lives on the developer laptop. The remote server checks that key and opens a shell session for the user.
To build a clear github copilot ssh audit log, teams replace static keys with OpenSSH certificates. An OpenSSH certificate holds a public key, an identity string, and a list of allowed user names. A Certificate Authority key signs these details so the target server trusts them. When you issue a certificate for an editor workflow, you place a clear name in the identity field. The remote server reads this identity string when the session starts and writes it to the system log. This step shows which key signed in and when the session began.
Setting up OpenSSH certificates for agent sessions
Start by creating a Certificate Authority key pair on a secure management machine. You put the public part of this authority key onto your remote Linux hosts. Next, you tell the remote OpenSSH server daemon to trust certificates signed by that authority. Instead of copying public keys to every host, you sign the local public key to make a user certificate. During the signing step, you attach a distinct key identity and a set of allowed host user names.
You should also set a short validity window when you sign the certificate. By default, OpenSSH certificates last forever unless you set a stop time. A short window forces the user or tool to get a fresh certificate each day. You can also attach certificate options that turn off port forwarding or agent forwarding. Once the signed certificate is on the laptop, the editor uses it for remote connections. The remote server then records the certificate serial number and identity string in the system auth log.
Audit Log Integrity + SSH Access Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native server logs miss during agent sessions
OpenSSH server logs do a great job of recording who logged in and when they left. The server writes down the key identity, the principal name, and the source network address. Still, standard server logs only check the start and end of a session. Once the shell opens, the remote daemon does not log every command the coding agent runs. If the assistant reads a sensitive file or drops a table, the auth log stays quiet.
Also, the remote server cannot tell if a human or an AI agent typed a command. Both share the same local terminal and use the same signed certificate on the laptop. Even if you turn on verbose server logging, capturing full command text inside an interactive shell is hard. Users or agents can run scripts, open subshells, or transfer files that bypass basic history files. Native host logs show that a connection happened, but they miss what the commands did in flight. They also cannot rewrite sensitive values like emails, phone numbers, card numbers, or national IDs in command output.
Add command and file guardrails to SSH access
Host firewalls and certificate principals control who opens an SSH session. Yet an allowed user or agent can still run a bad one-shot command or pull sensitive files over sftp. In practice, hoop.dev sits inline on the host as an open-source SSH server with guardrails that uses OpenSSH certificates. For every one-shot command or sftp task an agent or human runs in production, hoop.dev decides to pass, mask, block, or escalate it for review.
Using hoop.dev SSH controls, guardrails check one-shot commands, env variable names, and sftp or scp paths before they run. Port forwards default to deny unless the target is listed. Because interactive shells have no statement boundary and carry no guardrails, teams can turn them off so every command is checked and logged. Check out the MIT-licensed project on GitHub.
Frequently asked questions
Can OpenSSH tell when GitHub Copilot runs a command instead of a human?
No, OpenSSH only sees the local client key or certificate used to open the connection. Since the editor runs commands inside the user terminal, both human and agent actions look identical to the host.
What does an OpenSSH certificate add to the server audit log?
An OpenSSH certificate adds the custom identity string, the serial number, and the signing authority fingerprint to the log. This removes the need to track raw key fingerprints across dozens of separate servers.
Do OpenSSH certificates stop an agent from running dangerous shell commands?
A certificate can restrict a session to a single preset command if you add that option during signing. Still, if the agent needs an open shell to work, the certificate cannot filter individual commands inside that shell.
Related guides
In this post