[enhancement] Create / import SSH keys for other user

Bug #1786193 reported by Tytus Kurek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Newell Jensen

Bug Description

Assume I have two users (user1 and user2), both with admin privileges. At the moment it is not possible to create / import SSH keys for user2 when using CLI as user1. It would be also good to have an option to create / import SSH key for newly created users. It becomes important when you have to create hundreds of users.

Related branches

summary: - Create / import SSH keys for other user
+ [enhancement] Create / import SSH keys for other user
Changed in maas:
milestone: none → next
status: New → Triaged
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Tytus,

To fully understand the use case and highlight potential risks, I have a couple of questions:

I was just wondering to what extend is this? Is it just about importing the ssh key of another and importing, once, or does I extend to be able to edit it?

Also, I’m wondering why can’t users import their own SSH keys once they log into MAAS? It seems that if you were to add multiple users each user would have to ensure the right ssh key is available for them to use rather than expect someone else to import them.

Thanks!

tags: added: wishlist
Revision history for this message
Tytus Kurek (tkurek) wrote :

Andres,

My use case is that I have to create around 200 accounts in MaaS and import SSH keys for them from central repository. Of course the import could be done by users themselves, but if I have ~10 MaaS instances this becomes problematic.

From my point of the features that would be nice to have would be:

1) Specify ssh key during account creation, for example:

maas maas users create username=tkurek <email address hidden> password=tkurek is_superuser=1 key="<ssh key>"

maas maas users create username=tkurek <email address hidden> password=tkurek is_superuser=1 key=lp:tkurek

2) Specify user for which the SSH key is being imported:

maas maas sshkeys create key="<ssh key>" user=tkurek

Changed in maas:
status: Triaged → In Progress
assignee: nobody → Newell Jensen (newell-jensen)
importance: Undecided → Medium
Changed in maas:
milestone: next → 2.5.0rc1
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.5.0rc1 → 2.5.0beta4
status: Fix Committed → Fix Released
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.