Summary:
Adds a the provided public SSH key to a model and all currently deployed units within that 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. 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.
e.g.:
Usage: juju add-ssh-key <ssh-key>
Summary:
Adds a the provided public SSH key to a model and all currently deployed units within that 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. 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 AAAAB3NzaC1yc2E AAAADAQABAAABAQ Cygc6Rc9XgHdhQq TJ I3xGrOtk21xYtKi kGqItAHmrE5+ VH6PY1rVIUXhpTg pSkJsHLmhE29OhI pt8vQSOCh+ 0 HIOJEgJEzIqC52r CYXLvr/ BVkd4IoM1vpb/ n6u9o8v1a0VUGfc /J6tQAcPRExz Fq4JLYC41miiJtH w4b3qYu7qm3vh4e CiK1LqLncXnBCJ0 pADXaL5OQ9dmD3a Cb mPosgmhVCAHObWH wNQ/ZU2KrX1/ lv/+lBChx2tJliq QpyYMiA3nrtSjfq 3AF1r SQbGc6+ vLcXZ9KQpuYDt joe@ubuntu"
Wsoj+
qYfS5LieM79
jZUVs8HdLtc
i8KFyOEs3Uu
QgZVF5vz8LE
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