doapi-ssh-key

NAME

doapi-ssh-key — manage SSH public keys on DigitalOcean

SYNOPSIS

doapi-ssh-key new    [--unique]      <name> [<file>]
doapi-ssh-key show   [-M|--multiple] [<ssh key> ...]
doapi-ssh-key update [--unique]      <ssh key> <new name>
doapi-ssh-key delete [-M|--multiple] <ssh key> ...

doapi-ssh-key also takes the universal options common to all doapi commands.

SSH keys can be specified by ID number, fingerprint, or name. A name that is also a valid ID or fingerprint is interpreted as such rather than as a name (and so SSH keys with such names must be referred to by their ID or fingerprint instead).

new

doapi-ssh-key new [--unique] <name> [<file>]

Register the contents of <file> (or standard input if no file is specified) as a new SSH public key with name <name>. The new key is output as an SSHKey object converted to JSON.

Options

--unique

If <name> is already in use by another key, fail with an error. Without this option, a warning will still be generated if <name> is already in use.

show

doapi-ssh-key show [-M|--multiple] [<ssh key> ...]

Show SSH keys. If no keys are specified, all keys registered to the account are shown. The keys are output as a list of SSHKey objects converted to JSON.

Options

-M, --multiple

If an argument is the name of more than one key, show all keys with that name instead of erroring.

update

doapi-ssh-key update [--unique] <ssh key> <new name>

Update (i.e., rename) an SSH key. The updated key is output as an SSHKey object converted to JSON.

Options

--unique

If <new name> is already in use by another key, fail with an error. Without this option, a warning will still be generated if <new name> is already in use.

delete

doapi-ssh-key delete [-M|--multiple] <ssh key> ...

Delete SSH keys. There is no output.

Options

-M, --multiple

If an argument is the name of more than one key, delete all keys with that name instead of erroring.