login
Use credentials to generate a config file in `ionosctl cfg location`
Usage
Aliases
For config
command:
For login
command:
Description
The 'login' command allows you to authenticate with the IONOS Cloud APIs. There are three ways you can use it:
Interactive mode: Just type 'ionosctl login' and you'll be prompted to enter your username and password.
Use the '--user' and '--password' flags: Enter your credentials in the command.
Use the '--token' flag: Provide an authentication token. Note: If using '--token', you can skip verifying the used token with '--skip-verify'
If you specify a custom '--api-url', the custom URL will also be saved to the config file when you login successfully and used for future API calls.
If you use a username and password, this command will use these credentials to generate a token that will be saved in the config file. Please keep this token safe.
To find your config file location, use 'ionosctl cfg location'. If you want to use a different config file, use the '--config' global option. Changing the permissions of the config file will cause it to no longer work.
If a config file already exists, you will be asked to replace it. You can skip this verification with '--force'
AUTHENTICATION ORDER ionosctl uses a layered approach for authentication, prioritizing sources in this order:
Global flags
Environment variables
Config file entries Within each layer, a token takes precedence over a username and password combination. For instance, if a token and a username/password pair are both defined in environment variables, ionosctl will prioritize the token. However, higher layers can override the use of a token from a lower layer. For example, username and password environment variables will supersede a token found in the config file.
Options
Examples
Last updated