metalcloud-cli user ssh-key-add

Add an SSH key to a user account

Synopsis

Add a new SSH key to a specific user account for authentication purposes.

This command allows adding SSH public keys to user accounts which can then be used for authentication when connecting to provisioned instances. The SSH key content should be a valid public key in OpenSSH format.

Arguments: user_id The numeric ID of the user to add the SSH key to

Required Flags: –key The SSH public key content (OpenSSH format)

Examples: metalcloud-cli user ssh-key-add 12345 –key “ssh-rsa AAAAB3NzaC1yc2EAAAA…” metalcloud-cli user add-ssh-key 12345 –key “$(cat ~/.ssh/id_rsa.pub)”

metalcloud-cli user ssh-key-add user_id [flags]

Options

  -h, --help         help for ssh-key-add
      --key string   The content of the SSH key.

Options inherited from parent commands

  -k, --api_key string         MetalCloud API key
  -c, --config string          Config file path
  -d, --debug                  Set to enable debug logging
  -e, --endpoint string        MetalCloud API endpoint
  -f, --format string          Output format. Supported values are 'text','csv','md','json','yaml'. (default "text")
  -i, --insecure_skip_verify   Set to allow insecure transport
  -l, --log_file string        Log file path
  -v, --verbosity string       Log level verbosity (default "INFO")

SEE ALSO

Auto generated by spf13/cobra on 11-Aug-2025