Comment 0 for bug 1816421

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

Juju does not add an ssh public key from your local client's directory (.local/share/juju/ssh/id_rsa.pub) to a per-model cache when deploying to a model created by somebody else.

This is more of a UX request, consider the following:

1) and admin creates a model for you and gives you rw rights on it;
2) you login to the target controller (via Candid in my case);
3) switch to the created model;
4) you can deploy to this model but `juju ssh` fails as your key was not imported;
5) then you do `juju add-ssh-key <key-from-local-share-juju-ssh-id_rsa.pub>` and now you can ssh there.

The first impression when you encounter an authentication error is that Juju did something wrong when importing keys.

If you know that `juju run` allows you to do `cat .ssh/authorized_keys` you may be able to figure it out but this is far from obvious for a novice user who is likely to be a consumer of a model (e.g. in the JAAS use-case).