Skip to main content

dtctl ssh create

Usage​

dtctl ssh create [flags]

Aliases​

c

Description​

Register an existing SSH public key with your account under a name, so it can be injected into virtual machines you create (pass the key name to dtctl virtual-machine create --ssh-key-name).

Set --public-key to the full contents of your public key file (for example ~/.ssh/id_rsa.pub). Registering a key does not modify any existing virtual machines.

Example​

# Register a public key by reading it from a local file
dtctl ssh create --name my-key --public-key "$(cat ~/.ssh/id_rsa.pub)"

Response​

In text output (the default), this command returns the following columns: Name, Public Key, Fingerprint, Created At, UserID.

Pass --output json to get the full response object instead.

Flags​

OptionDescription
--name, -nName to register the SSH key under (required)
--public-key, -kThe full public key content (for example the contents of id_rsa.pub) (required)
CommandDescription
dtctl ssh listList SSH keys
dtctl ssh showShow an SSH key
dtctl ssh deleteDelete an SSH key
dtctl ssh generateGenerate a new SSH key pair

Global Flags​

OptionDescription
--api-urlSend this command to a different API endpoint, e.g. a test environment (default "https://console.dt.net.tr/api/v1")
--config, -cSpecify a custom config file
Default: ~/.config/dtctl/config.yaml
--no-headersOmit the column headers, for scripting
Default: false
--output, -oOutput format: text, wide, vertical, json. text fits the terminal, wide never truncates, vertical prints one field per line
Default: text