Skip to main content
Complete 2FA login by verifying code

Usage

vastai tfa login [--code CODE] [--sms] [--secret SECRET] [--backup-code BACKUP_CODE]

Options

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

Description

Complete Two-Factor Authentication login by providing the 2FA code. For TOTP (default): Provide the 6-digit code from your Authenticator app For SMS: Include the —sms flag and provide -s/—secret from the tfa send-sms command response For backup code: Use —backup-code instead of code (codes may only be used once)

Examples

vastai tfa login -c 123456
 vastai tfa login --code 123456 --sms --secret abc123def456
 vastai tfa login --backup-code ABCD-EFGH-IJKL

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)