CH·02CLI reference

gpu keys set-attach

Toggle whether a key is auto-attached to instances at launch

Toggle whether a key is auto-attached to instances at launch

Synopsis

Set whether this SSH key is automatically added to the authorized_keys of instances you launch without an explicit --ssh-key-id. The flag defaults to on when a key is created, so a fresh key is attached to new instances until you turn it off here. Pass exactly one of --on or --off. Members may only toggle their own keys; admins may toggle any key in the org. Already-running instances are unaffected — the flag only governs future launches.

gpu keys set-attach <key-id> [flags]

Examples

# Stop a key from being auto-attached to new instances
gpu keys set-attach key-abc123 --off

# Re-enable auto-attach
gpu keys set-attach key-abc123 --on

Options

  -h, --help   help for set-attach
      --off    Stop auto-attaching this key at launch
      --on     Auto-attach this key to new instances at launch

Options inherited from parent commands

      --api-base string   API base URL (override with GPUAI_API_BASE env) (default "https://api.gpu.ai/v1")
      --debug             Enable debug logging to stderr
  -o, --output string     Output format: table|json (default table on TTY, json otherwise)

SEE ALSO

← The gpu CLI