Skip to content

ssh-keys

Your SSH public keys. They belong to your user and apply to every machine in every project of every organization you are a member of. Only ed25519 and ECDSA keys are accepted.

Add and remove keys in the portal (Account → SSH keys). The CLI can list them, but adding or removing one gets a 403 (exit code 3): an API key works in the projects it reaches, and an SSH key opens the machines of all of them (a key inside a machine must not open the others).

space ssh-keys list

space ssh-keys list

Id, label, type, fingerprint and last use of each key.

space ssh-keys add

space ssh-keys add [<file>] [--label <label>]

Uploads a public key and prints its type, label, fingerprint and id. Without <file> it uses the first of ~/.ssh/id_ed25519.pub and ~/.ssh/id_ecdsa.pub; - reads the key from stdin. Without --label, the key’s comment is the label. It refuses a private key file and a file with more than one key.

space ssh-keys add --label laptop
space ssh-keys add ~/.ssh/work_ed25519.pub --label work

space ssh-keys remove

space ssh-keys remove <id>

Removes the key (by the id from space ssh-keys list). It stops working for new connections to all machines.

Last updated on