Skip to content

sshkeys: add example to ssh-key import help text#1837

Open
beardicus wants to merge 1 commit into
digitalocean:mainfrom
beardicus:update-ssh-key-import-example
Open

sshkeys: add example to ssh-key import help text#1837
beardicus wants to merge 1 commit into
digitalocean:mainfrom
beardicus:update-ssh-key-import-example

Conversation

@beardicus
Copy link
Copy Markdown
Contributor

@beardicus beardicus commented Apr 30, 2026

This is responding to some ideas.digitalocean.com feedback from a confused user. Adds an example and some more description to doctl compute ssh-key import.

Summary

  • Add an Examples: block to doctl compute ssh-key import --help. Previously the subcommand had no example, while most neighbouring commands (e.g. firewalls, kubernetes, volumes, monitoring, registry) and newer commands (e.g. spaces keys) do.
  • Expand the long description to mention the <key-name> argument and the --public-key-file flag, matching the style used for the neighbouring create subcommand.

Help output

Before:

Use this command to add a new SSH key to your account, using a local public key file.

Note that importing a key to your account will not add it to any Droplets

Usage:
  doctl compute ssh-key import <key-name> [flags]
...

After:

Use this command to add a new SSH key to your account, using a local public key file.

Specify a `<key-name>` for the key, and set the `--public-key-file` flag to the path of a local public key file, such as `~/.ssh/id_ed25519.pub`.

Note that importing a key to your account will not add it to any Droplets.

Usage:
  doctl compute ssh-key import <key-name> [flags]

Aliases:
  import, i

Examples:
doctl compute ssh-key import example-key --public-key-file ~/.ssh/id_ed25519.pub
...

The `doctl compute ssh-key import` subcommand had no Examples section
in its help output. Add a concrete invocation showing a key name and
--public-key-file flag, and expand the long description to mention
both the <key-name> argument and the --public-key-file flag, matching
the style used for the neighbouring create subcommand.
Copy link
Copy Markdown
Member

@Bala-Nallamilli Bala-Nallamilli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants