Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 2.11 KB

metal_2fa_enable.md

File metadata and controls

50 lines (36 loc) · 2.11 KB

metal 2fa enable

Enables two factor authentication.

Synopsis

Enables two-factor authentication on the current user's account. Two-factor auth is available either via SMS or an application. A current OPT code is required, which can be generated by the 2fa receive command.

metal 2fa enable (-s | -a) --code <OTP_code> [flags]

Examples

  # Enable two factor authentication via SMS.
  metal 2fa enable -s -c <OTP_code>

  # Enable two factor authentication via an application.
  metal 2fa enable -a -c <OTP_code>

Options

  -a, --app           Enables two-factor authentication using an application on the current user's account.
  -c, --code string   Two-factor authentication code that is provided by a request to the 2fa receive command.
  -h, --help          help for enable
  -s, --sms           Enables two-factor authentication using SMS on the current user's account.

Options inherited from parent commands

      --config string         Path to JSON or YAML configuration file (METAL_CONFIG)
      --exclude strings       Comma separated Href references to collapse in results, may be dotted three levels deep
      --filter stringArray    Filter 'get' actions with name value pairs. Filter is not supported by all resources and is implemented as request query parameters.
      --http-header strings   Headers to add to requests (in format key=value)
      --include strings       Comma separated Href references to expand in results, may be dotted three levels deep
  -o, --output string         Output format (*table, json, yaml). env output formats are (*sh, terraform, capp).
      --search string         Search keyword for use in 'get' actions. Search is not supported by all resources.
      --sort-by string        Sort fields for use in 'get' actions. Sort is not supported by all resources.
      --sort-dir string       Sort field direction for use in 'get' actions. Sort is not supported by all resources.
      --token string          Metal API Token (METAL_AUTH_TOKEN)

SEE ALSO

  • metal 2fa - Two-factor Authentication operations: receive, enable, disable.