Skip to main content
Remove a 2FA method from your account

Usage

vastai tfa delete [--id-to-delete ID] [--code CODE] [--sms] [--secret SECRET] [--backup-code BACKUP_CODE] [--method-id ID]

Options

-id
integer
ID of the 2FA method to delete (see vastai tfa status) (alias: --id-to-delete)
-c
string
2FA code from your Authenticator app or SMS to authorize deletion (alias: --code)
--sms
boolean
Use SMS 2FA method instead of TOTP
-s
string
Secret token (required for SMS authorization) (alias: --secret)
-bc
string
One-time backup code (alternative to regular 2FA code) (alias: --backup-code)
--method-id
string
2FA Method ID if you have more than one of the same type (‘id’ from tfa status)

Description

Remove a 2FA method from your account. This action requires 2FA verification to prevent unauthorized removals.
NOTE: If you do not specify —id-to-delete, the system will attempt to delete the method you are using to authenticate. However please be advised, it is much safer to specify the ID to avoid confusion if you have multiple methods.
Use vastai tfa status to see your active methods and their IDs.

Examples

# Delete method #123, authorize with TOTP/Authenticator code
 vastai tfa delete --id-to-delete 123 --code 456789

 # Delete method #123, authorize with SMS and secret from `tfa send-sms`
 vastai tfa delete -id 123 --sms --secret abc123def456 -c 456789

 # Delete method #123, authorize with backup code
 vastai tfa delete --id-to-delete 123 --backup-code ABCD-EFGH-IJKL

 # Delete method #123, specify which TOTP method to use if you have multiple
 vastai tfa delete -id 123 --method-id 456 -c 456789

 # Delete the TOTP method you are using to authenticate (use with caution)
 vastai tfa delete -c 456789

Global Options

The following options are available for all commands:
OptionDescription
--url URLServer REST API URL
--retry NRetry limit
--rawOutput machine-readable JSON
--explainVerbose explanation of API calls
--api-key KEYAPI key (defaults to ~/.config/vastai/vast_api_key)