help text for juju add-ssh-key needs improving

Bug #1557380 reported by Nick Veitch
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Medium
Reed O'Brien

Bug Description

e.g.:

Usage: juju add-ssh-key <ssh-key> ...

Summary:
Adds a public SSH key to a model.

Options:

-m, --model (= "")
  Model to operate in

Details:
Juju maintains a per-model cache of public SSH keys which it copies to each unit (including units already deployed). By default this includes the key of the user who created the model (assuming it is stored in the default location ~/.ssh/). Additional keys may be added with this command, quoting the entire public key as an argument.

Examples:

    juju add-ssh-key "ssh-rsa qYfS5LieM79HIOr535ret6xy
    AAAAB3NzaC1yc2EAAAADAQA6fgBAAABAQCygc6Rc9XgHdhQqTJ
    Wsoj+I3xGrOtk21xYtKijnhkGqItAHmrE5+VH6PY1rVIUXhpTg
    pSkJsHLmhE29OhIpt6yr8vQSOChqYfS5LieM79HIOJEgJEzIqC
    52rCYXLvr/BVkd6yr4IoM1vpb/n6u9o8v1a0VUGfc/J6tQAcPR
    ExzjZUVsfjj8HdLtcFq4JLYC41miiJtHw4b3qYu7qm3vh4eCiK
    1LqLncXnBCJfjj0pADXaL5OQ9dmD3aCbi8KFyOEs3UumPosgmh
    VCAfjjHObWHwNQ/ZU2KrX1/lv/+lBChx2tJliqQpyYMiA3nrtS
    jfqQgZfjVF5vz8LESQbGc6+vLcXZ9KQpuYDt joe@ubuntu"

For ease of use, on Ubuntu/CentOS/MacOSX it is possible to use shell substitution to pass the key to the command:

    juju add-ssh-key $(cat ~/mykey.pub)

See also: list-ssh-key
          remove-ssh-key
          import-ssh-key

Tags: helpdocs
Nick Veitch (evilnick)
description: updated
description: updated
description: updated
Changed in juju-core:
status: New → Triaged
importance: Undecided → Critical
importance: Critical → Medium
milestone: none → 2.0-beta3
Revision history for this message
Reed O'Brien (reedobrien) wrote :

This has a multi-line summary.

Revision history for this message
Nick Veitch (evilnick) wrote :

updated

description: updated
Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Cheryl Jennings (cherylj)
Revision history for this message
Cheryl Jennings (cherylj) wrote :
description: updated
description: updated
Changed in juju-core:
assignee: Cheryl Jennings (cherylj) → Reed O'Brien (reedobrien)
milestone: 2.0-beta3 → 2.0-rc1
Revision history for this message
Reed O'Brien (reedobrien) wrote :

Note: apparently $(...) expansion also works on windows. So that sentence was modified.
Output:

Usage: juju add-ssh-key [options] <ssh key> ...

Summary:
Adds a public SSH key to a model.

Options:
-m, --model (= "")
    Model to operate in

Details:
Juju maintains a per-model cache of public SSH keys which it copies to
each unit (including units already deployed). By default this includes the
key of the user who created the model (assuming it is stored in the
default location ~/.ssh/). Additional keys may be added with this command,
quoting the entire public key as an argument.

Examples:
    juju add-ssh-key "ssh-rsa qYfS5LieM79HIOr535ret6xy
    AAAAB3NzaC1yc2EAAAADAQA6fgBAAABAQCygc6Rc9XgHdhQqTJ
    Wsoj+I3xGrOtk21xYtKijnhkGqItAHmrE5+VH6PY1rVIUXhpTg
    pSkJsHLmhE29OhIpt6yr8vQSOChqYfS5LieM79HIOJEgJEzIqC
    52rCYXLvr/BVkd6yr4IoM1vpb/n6u9o8v1a0VUGfc/J6tQAcPR
    ExzjZUVsfjj8HdLtcFq4JLYC41miiJtHw4b3qYu7qm3vh4eCiK
    1LqLncXnBCJfjj0pADXaL5OQ9dmD3aCbi8KFyOEs3UumPosgmh
    VCAfjjHObWHwNQ/ZU2KrX1/lv/+lBChx2tJliqQpyYMiA3nrtS
    jfqQgZfjVF5vz8LESQbGc6+vLcXZ9KQpuYDt joe@ubuntu"

For ease of use it is possible to use shell substitution to pass the key
to the command:

    juju add-ssh-key $(cat ~/mykey.pub)

See also:
    list-ssh-key
    remove-ssh-key
    import-ssh-key

Aliases: add-ssh-keys

Revision history for this message
Peter Matulis (petermatulis) wrote :

SGTM

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
affects: juju-core → juju
Changed in juju:
milestone: 2.0-beta5 → none
milestone: none → 2.0-beta5
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.