Configuring a user should not configure root's authorized_keys

Bug #1871879 reported by Florian Apolloner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Wishlist
Unassigned

Bug Description

When `ssh_authorized_keys` is configured in user-data keys are unconditionally copied into /root/.ssh/authorized_keys.

If `disable_root` is set to true it leaks the actual configured username: "Please login as the user XYZ rather than the user root." With `disable_root` set to false you can login.

It would be great if there were a way to actually disable root and not touch it at all. I fully understand that the info message is useful for new users, but it would be great to have a way to leave root alone.

description: updated
description: updated
Revision history for this message
Andras Kovacs (andras0602) wrote :

It would be great!

Now I do it like:
runcmd:
 - rm -f /root/.ssh/authorized_keys
But a proper option would be better.

Revision history for this message
Dan Watkins (oddbloke) wrote :

Hi Florian, Andras, thanks for the report and confirmation! Do you have any thoughts on what configuration for this might look like?

Changed in cloud-init:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Florian Apolloner (apollo13) wrote :

Hi Dan,

thanks for taking this into consideration. My gut-feeling would be an option ala "root_login_help_msg: <true|false>" (Naming is hard). Preferably I'd have it set to false by default but I doubt that will fly :D

Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Triaged → Expired
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.