Keyturn docsCommand reference

keyturn auth

your sign-in, second factor and service tokens

auth enrollM

enroll a second factor (TOTP) on keyturnd: a key for your authenticator app, then its first code

keyturn auth enroll [--server URL] [--user NAME] [--ca FILE] [--otp CODE] [--print-uri]
Exampleskeyturn auth enroll

auth confirmM

confirm a pending enrollment with the app's first code

keyturn auth confirm <code> [--server URL] [--user NAME] [--ca FILE]
Exampleskeyturn auth confirm CODE

auth whoamiR

who you sign in as on the server, and your second factor's state

keyturn auth whoami [--server URL] [--user NAME] [--ca FILE] [--otp CODE]
Exampleskeyturn auth whoami

auth statusR

your session's expiry, and the server's second-factor rules

keyturn auth status [--server URL] [--user NAME] [--ca FILE] [--otp CODE]
Exampleskeyturn auth statuskeyturn auth status -o json

auth resetD

remove another person's second factor so they can enroll again (administrators)

keyturn auth reset <name> [--yes] [--server URL] [--user NAME] [--ca FILE] [--otp CODE]
Exampleskeyturn auth reset "Jane Doe/Sales/Acme" --yes

auth token createM

mint a service token for scripts (keyturnd): shown once

keyturn auth token create [--name NAME] [--scope read|change] [--expires DAYS] [--product ID] [--server URL] [--user NAME] [--ca FILE] [--otp CODE]
Exampleskeyturn auth token create --name nightly-report --scope read --expires 30dkeyturn auth token create --name provisioning --scope change --expires 12w

auth token listR

your service tokens on the server: id, name, scope, expiry (never a secret)

keyturn auth token list [--server URL] [--user NAME] [--ca FILE]
Exampleskeyturn auth token listkeyturn auth token list -o csv

auth token revokeD

revoke one of your service tokens, at once

keyturn auth token revoke <id> [--yes] [--server URL] [--user NAME] [--ca FILE] [--otp CODE]
Exampleskeyturn auth token revoke 3f9a1c0b7e24 --yes

auth policy showR

the server's authentication policy: second factor, sessions, sign-in limits, tokens

keyturn auth policy show [--server URL] [--ca FILE]
Exampleskeyturn auth policy showkeyturn auth policy show -o json

auth policy setD

set require-otp in keyturnd's configuration file, for its next load

keyturn auth policy set <key=value> [--yes] [--dry-run] [--server URL] [--user NAME] [--ca FILE] [--otp CODE]
Exampleskeyturn auth policy set require-otp=true --dry-runkeyturn auth policy set require-otp=true --yes

auth recovery-codes regenerateD

ten new one-time recovery codes for your second factor (the old ones stop working)

keyturn auth recovery-codes regenerate [--server URL] [--user NAME] [--ca FILE] [--otp CODE] [--none] [--yes]
Exampleskeyturn auth recovery-codes regenerate --yes