---
title: "SSH access"
description: "Connect to a sandbox over SSH."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.jgcp.mistrivedev.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SSH access

Connect to a sandbox over SSH to debug it, edit files or run tools by hand. Each sandbox has one SSH access resource. You ask it for a short-lived credential and connect with any SSH client.

## Credentials

`issueCredential` returns a host, a port, a user and a private key. The key works only for that sandbox and expires at `expireTime`. Ask for a new credential when it expires.

Keep the private key out of source control and out of other sandboxes. Write it to a file that only you can read, as the sample does.

## Use it with other tools

The credential works with any tool that speaks SSH, such as `scp`, `rsync` or your editor's remote extension. Pass the key with `-i` and the port with `-p` (`-P` for `scp`).

In the CLI, `sutra ssh` issues a credential and starts `ssh` for you.

:::note[Today]
Today you register your own public key instead of receiving a credential. The SDKs call `openSandboxAccessBinding` (`open_sandbox_access_binding` in Python, with `"protocol": "SSH"`) with your key and return the command to connect. `anchor sandbox ssh` finds your local key, registers it and connects. You log in as the user `anchor`.

Each sandbox makes its own SSH host keys, ED25519 and ECDSA, when it starts, so a client accepts the key on first use. `anchor sandbox ssh` keeps it in `~/.anchor/known_hosts`. A client that accepts only RSA host keys cannot connect.
:::

Source: https://docs.jgcp.mistrivedev.com/sandboxes/ssh/index.mdx
