Juju - 如何在部署后将 SSH 密钥添加到模型

Juju - 如何在部署后将 SSH 密钥添加到模型

在我使用 Juju 部署了一些 charms 之后,如果模型中的所有 SSH 密钥发生变化,我该如何更新它们?

答案1

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

来源:文档

答案2

ubuntu@zazen:~$ cat /home/ubuntu/.ssh/id_rsa.pub ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC45nbLLxqE8roqn/N4pdppZ5efBP4YiQDu9EdlD9Jey8cODaW/OWobZoPKNL8VvnhT0Hosjs7DGp1zuqjffY6FqdXWZ0+S7SlWRs8L4Jihhyk2xBXoEi6eRW7QXpnnkZpnZlfrjbKSFBguqRtVp6JPA1jpi9T3IM1xAIBDXKDcZF53ZE87Bd2AitOJ2tkBaPLz6LjeDw863m5IXHgA3lmP0/SdybvhhUHtc78n1​​/CStZ5eDVDa 37AB4rPA15bI9Th8T45NWmQ5yq26OGJu7BypiPhVl0/+8v4YNI8abEOXdOfcdKnci0idvdE6MOcj8TfqmiXxLC/iuNd/pldZtOfS+BpuODIidvmsKPvewYmBvRDBmmDpRDFsGurkt5Jfo32AnlTHn9MOYNUGmMvUw4JwRKPVlja1bYAW3rtMpMVdTJ4ybB7b8Fo6uyKqwv2VCRYnQpx01OzwvP/muaeNiIb32BiA9fDGEoijm1vuofsYYCwYL9DvrUM1y7bygTBUats= ubuntu@zazen

ubuntu@zazen:~$ juju 添加 ssh 密钥 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC45nbLLxqE8roqn/N4pdppZ5efBP4YiQDu9EdlD9Jey8cODaW/OWobZoPKNL8VvnhT0Hosjs7DGp1zuqjffY6FqdXWZ0+S7SlWRs8L4Jihhyk2xBXoEi6eRW7QXpnnkZpnZlfrjbKSFBguqRtVp6JPA1jpi9T3IM1xAIBDXKDcZF53ZE87Bd2AitOJ2tkBaPLz6LjeDw863m5IXHgA3lmP0/SdybvhhUHtc78n1​​/CStZ5eDVDa 37AB4rPA15bI9Th8T45NWm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