SSH Key in MAAS GUI not working

Bug #1582818 reported by garyx
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Hi there,

I have deployed a juju controller on a MAAS node without issue and JUJU GUI is deployed. I am now trying to log into the machine itself that is hosting the juju controller + juju GUI but it seems the key that was saved in the MAAS GUI is not being used so I cannot access the node the publickey authentication fails.

I have not deployed any charms or machines and just want to access the node machine itself to check some storage setup.

Can someone reproduce or do you need logs. I am not creating a keypair on the maas deployement machine, I just add my pub key in the MAAS gui as I want that key to work on the deployed nodes.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

From the MAAS perspective, every time the machine deploys, cloud-init imports the SSH key from MAAS allowing the user to SSH in. This is the current behavior in all versions of MAAS.

Revision history for this message
garyx (garyx) wrote :

Well I have another node deployed from MAAS without JUJU just in ready state and I can SSH into that node just fine. But the node with JUJU installed will not take the SSH key provided.

Revision history for this message
Bogdan Teleaga (bteleaga) wrote :

Juju should not mess with existing ssh keys. You can ssh using juju ssh or using juju's ssh key and check if the maas one is there. It seems to be present on my deployment

Revision history for this message
garyx (garyx) wrote :

Ahh switching to the admin model I found the machine and logged in using juju ssh. But the maas key is not present inside the machine in authorized_keys. Is that by design?

Revision history for this message
garyx (garyx) wrote :

The documentation in MAAS says to add the pub key in the gui in the quickstart, juju documentation says you can add it by using the following "authorized-keys-path: ~/.ssh/id_rsa.pub" for example. Those two documentations are confusing as they conflict in this sense.

https://maas.ubuntu.com/docs2.0/juju-quick-start.html

It would be good to either clear up the documentation so the config line is the preffered way to add the ssh keys.

But also the pub ssh key added in the maas gui is available through the MAAS api, so I wonder if that should be added automatically as it is already designated as the default pub key for nodes. I do not have insight into the architectural design choices you guys are making with MAAS + JUJU but this is something I would appreciate to have clear either way.

Revision history for this message
Cheryl Jennings (cherylj) wrote :

We could very well be overwriting the sshkeys in juju. In the cloud init config, we do specify an ubuntu user and their ssh keys.

For now, the most reliable way to set the ssh keys is through juju's authorized keys.

Changed in juju-core:
status: New → Triaged
importance: Undecided → Medium
affects: juju-core → juju
Revision history for this message
Luca (l-dellefemmine) wrote :

I reproduced this bug adding MAAS key before the juju bootstrap.

Ian Booth (wallyworld)
tags: added: maas-provider
removed: maas
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Medium → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.