juju add-ssh-key¶
See also: ssh-keys, remove-ssh-key, import-ssh-key
Summary¶
Adds a public SSH key to a model.
Usage¶
juju add-ssh-key [options] <ssh key> ...
Options¶
Flag |
Default |
Usage |
|---|---|---|
|
false |
Do not use web browser for authentication |
|
Model to operate in. Accepts [<controller name>:]<model name>|<model UUID> |
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)"
Details¶
Juju maintains a per-model cache of public SSH keys which it copies to each unit (including units already deployed). All keys must be added to a model explicitly with this command, quoting the entire public key as an argument.