Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am encountering an error when installing Juju:

juju bootstrap
ERROR error parsing environment "maas": no public ssh keys found. 

I have installed RSA key which is found in my root folder after I have used my root user to create it.

Any idea?

share|improve this question
add comment

2 Answers 2

In my case, it failed because the file did not exists. Creating the file solved the issue.

mkdir $HOME/.ssh
touch $HOME/.ssh/authorize_keys
share|improve this answer
    
The authorized_keys file is copied to the ubuntu user on the nodes, such that it must contains the required public keys if you want to SSH on the nodes. Self-login would be cp .ssh/id_rsa.pub .ssh/authorized_keys. –  fgiraldeau Mar 19 at 17:55
add comment

By default, juju looks in the current user's ~/.ssh for a public key file; it'll choose (in order of preference) id_dsa.pub, id_rsa.pub, or identity.pub, and will authorize that key for the ubuntu user on every machine it provisions.

If your setup is more complex, you can edit your environment configuration to specify the path to an authorized_keys file containing any number of public keys (or, indeed, a single public key in another location):

environments:
  maas:
    ...
    authorized-keys-path: /path/to/authorized-key(s)
    ...

...but, if you don't have a corresponding private key in an expected location, you may need to edit ~/.ssh/config to specify an IdentityFile before you can use juju ssh, juju scp, juju debug-log or juju debug-hooks.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.