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.
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: 535ret6xy yc2EAAAADAQA6fg BAAABAQCygc6Rc9 XgHdhQqTJ I3xGrOtk21xYtKi jnhkGqItAHmrE5+ VH6PY1rVIUXhpTg 9OhIpt6yr8vQSOC hqYfS5LieM79HIO JEgJEzIqC BVkd6yr4IoM1vpb /n6u9o8v1a0VUGf c/J6tQAcPR 8HdLtcFq4JLYC41 miiJtHw4b3qYu7q m3vh4eCiK fjj0pADXaL5OQ9d mD3aCbi8KFyOEs3 UumPosgmh wNQ/ZU2KrX1/ lv/+lBChx2tJliq QpyYMiA3nrtS vz8LESQbGc6+ vLcXZ9KQpuYDt joe@ubuntu"
juju add-ssh-key "ssh-rsa qYfS5LieM79HIOr
AAAAB3NzaC1
Wsoj+
pSkJsHLmhE2
52rCYXLvr/
ExzjZUVsfjj
1LqLncXnBCJ
VCAfjjHObWH
jfqQgZfjVF5
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