Unable to add machine that uses public/private key based authentication
Curtis Hovey-Canonical
curtis at canonical.com
Thu May 26 12:31:29 UTC 2016
On Wed, May 25, 2016 at 5:11 PM, Cheryl Jennings
<cheryl.jennings at canonical.com> wrote:
> Hi Phani,
>
> Is the key used for the machine known to juju? You can view the ssh keys
> with `juju authorized-keys list` for juju 1.x, and `juju list-ssh-keys` for
> juju 2.0.
>
> If it's not there, you can use the following commands to add the key and
> juju will try to use it when connecting to the machine:
> juju 1.x: `juju authorized-keys add`
> juju 2.0: `juju add-ssh-key`
>
> Let me know if this works for you.
> Thanks!
> -Cheryl
>
> On Sat, May 21, 2016 at 5:18 AM, phani shankar <phanishankarpr at gmail.com>
> wrote:
>>
>> Hi,
>>
>> I am trying to use add-machine command to add a machine to juju
>> environment. The machine being added uses public/private key authentication.
>> I am facing following error.
>>
>> juju add-machine ssh:ubuntu at 10.115.0.2
>> ERROR subprocess encountered error code 255 (Permission denied
>> (publickey).)
>>
>>
>> This works fine when I use the command to add a machine which does
>> password based authentication. I understand that it is due to not passing
>> the correct key credentials. But I am not sure how I can pass necessary
>> credentials. Please advise.
Does "ssh ubuntu at 10.115.0.2" work
This command is using your localhost to do the initial connection. The
error can be from your localhost, not from the
state-server/controller.
Once your *client* juju has entered the machine it checks that jujud
is not installed, the machine can connection to the
state-server/controller over the private address, and there is an
ubuntu user. Your juju client will provision the machine. Once
complete, the machine will talk to the state-server/controller
normally.
--
Curtis Hovey
Canonical Cloud Development and Operations
http://launchpad.net/~sinzui
More information about the Juju-dev
mailing list