Register Agent Key
Register a key an agent can log its tunnel in with. Get your registration code, sign it with the key (ngris key sign <code>) and send the output as signature. The key then logs in as you, in your active account.
Preview. A key logs in tunnels only: the ngris API, app commands and the agent's edge-protection flags still need a token. See Key authentication.
A key can be registered once on ngris. Sending a key you already registered in this account returns 200 OK with that key, unchanged, and "existing": true, so the call is safe to repeat. A key registered by another member or in another account returns 409: delete it there, or create a new key.
Requires the endpoints:write permission on the active account. Not available with an OAuth/MCP token (use the dashboard or an API key) or while the account is suspended. Available on every plan. Registering a key adds an agent_key entry ("Agent key uploaded") to the account audit log.
Never send a private key. It is refused. A private key you pasted anywhere is no longer secret: create a new one.
Request body
-----BEGIN SSH SIGNATURE----- … -----END SSH SIGNATURE----- block, unchanged.Agent key SHA256:B5UOOVg/.Accepted keys
- ed25519 (recommended).
- RSA with 2048 to 4096 bits.
- Not accepted: hardware security keys, SSH certificates, ECDSA and DSA keys. The agent also can't use a key with a passphrase.
Response (201 Created; 200 OK when you already registered the key here)
uuid, name, key_type, fingerprint, user_uuid, user_name, created_at, last_used_at.true, you had already registered this key in this account. Nothing was added or changed, and item is the existing key.Errors
error says what to do next. See Common problems below.endpoints:write; the request uses an OAuth/MCP token (cannot mint long-lived credentials from an OAuth session); the account is suspended (code account_suspended); or your membership or the account changed while the key was being registered (You can't register agent keys in this account right now). Nothing is stored.this key is already registered on ngris — delete it there or create a new key for this account: another member or another account registered this key.Common problems
- A private key was sent: it is refused and no longer secret. Create a new key.
- The
.pubfile was sent: send the output of the signing command instead. - The output is cut off or was changed: run the signing command again and send its whole output.
- The signature is for another code or another key: get the code for this account, and sign it with the key you are registering.
- The key type or size isn't accepted, or the key can't be used: create a new key with
ssh-keygen -t ed25519.