Skip to main content
Generate a new set of backup codes. Requires 2FA verification. The CLI asks you to confirm (y/n) before proceeding, since this invalidates every existing backup code, and then prompts for how to save the new ones (a default file under ~/Downloads, a custom path, or print to screen).

Usage

Options

string
2FA code from your Authenticator app, SMS, or Email. Exactly one of --code or --backup-code is required. (alias: -c)
string
One-time backup code to authorize regeneration. Exactly one of --code or --backup-code is required. (alias: -bc)
string
2FA method type to use for verification. Choices: email, sms, totp. Only use when you have exactly one method of this type. (alias: -t)
string
Secret token required when verifying with --method-type sms or --method-type email. Obtain from vastai tfa send-sms or vastai tfa send-email. (alias: -s)
string
ID of the 2FA method to use for verification if you have more than one of the same type. Get the ID from vastai tfa status. (alias: -id)

Examples

Warning: Regenerating codes immediately invalidates all existing backup codes. Save the new codes in a secure location — they are not shown again.

Global Options

The following options are available for all commands: