Manage SSH identities
An SSH identity is a named public key on your account. Add one to connect to a Greenhouse machine from your own terminal or a local editor, such as VS Code or Zed over SSH. Orchard stores only the public key and never receives your private key.
Prerequisites
Section titled “Prerequisites”- The Greenhouse graft installed on your instance.
Generate a key with the CLI
Section titled “Generate a key with the CLI”Use this option if you do not need a specific key. The following command generates a key for Orchard and registers it as an identity:
orchard sandbox ssh-config --installThe command also adds an orchard-* entry to ~/.ssh/config, so ssh orchard-<MACHINE_NAME> works. To connect an editor this way, refer to Connect an editor over SSH.
Add an identity
Section titled “Add an identity”- Go to Account settings > Greenhouse.
- In SSH identities, select Add identity.
- In Name, enter a name, such as
laptop. - In Public key, paste your public key.
- Select Add identity.
orchard ssh-identity add laptop --key ~/.ssh/id_ed25519.pubImport keys from GitHub
Section titled “Import keys from GitHub”Orchard reads https://github.com/<username>.keys for your linked GitHub account and creates one identity for each key.
- Go to Account settings > Greenhouse.
- In SSH identities, select Import from GitHub.
orchard ssh-identity import-githubRemove an identity
Section titled “Remove an identity”Orchard refuses to remove an identity that is attached to a machine. The error names the machine:
Identity is attached to sandbox "my-machine"; detach it first-
Attach another identity to the machine:
orchard sandbox update <MACHINE_NAME> --identity <OTHER_IDENTITY> -
Remove the identity:
orchard ssh-identity remove <IDENTITY_NAME>
Rotate a key
Section titled “Rotate a key”- Add the new key as a new identity.
- Attach the new identity to your machines.
- Confirm that you can connect with the new key.
- Remove the old identity.
Related resources
Section titled “Related resources”- Machines - Create, start, and stop Greenhouse machines and attach identities to them.
orchard ssh-identityreference - Every flag of theorchard ssh-identitycommands.