Use these commands to authenticate the CLI, inspect your profile, manage SSH keys, and validate API tokens.
virak-cli login- Without flags, the CLI opens the Virak OAuth page in your browser and stores the returned token in
~/.virak-cli.yaml. - Provide
--tokento paste an API token directly (useful for headless servers). - The config file also stores your default zone so you do not need to pass
--zoneIdfor every command.
virak-cli user profileThis fetches /api/external/user/profile and prints name, email, organization, and feature entitlements. Keep this output handy for audits or support tickets.
List keys:
virak-cli user ssh-key listAdd a new key (generate one if needed):
ssh-keygen -t ed25519 -C "ops@example.com"
virak-cli user ssh-key create \
--name "ops-laptop" \
--public-key "$(cat ~/.ssh/id_ed25519.pub)"Delete a key:
virak-cli user ssh-key delete --ssh-key-id ssh-01HF...The CLI validates the ULID before hitting the API, reducing accidental removals. Removing unused keys follows the security guidance in the Virak documentation.
virak-cli user token abilities
virak-cli user token validatetoken abilitieslists every scope attached to the token currently stored in the config orVIRAK_CLI_TOKEN.token validateconfirms whether the token is still active. Run this in CI pipelines before starting long operations to fail fast when access is revoked.
- Store tokens as secrets in your CI/CD platform rather than embedding them in source control.
- Rotate SSH keys regularly and remove keys from the CLI as soon as devices are decommissioned.
- Combine
user token abilitieswith infrastructure as code reviews to ensure automation uses the minimum required scope set, as recommended in/virak-cloud/docs. - When collaborating across teams, use separate tokens per automation context so revoking one does not break unrelated workflows.
- Browser does not open during
login: pass--tokenwith a token generated from the Virak panel. user token validatefails: refresh the token via the panel or ask an organization admin for new credentials.- SSH access denied: confirm the key appears in
user ssh-key list, then redeploy the instance or ensure the key was attached during instance creation.
User commands map directly to GET/POST /api/external/user/* endpoints. If you need custom integrations, inspect network traffic with the --debug flag or call those endpoints directly using the token you validated above.