ssh connection to disabled root user exits with zero code

Bug #1170059 reported by Ilya Sher
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Low
Unassigned

Bug Description

cloudinit/config/cc_ssh.py : DISABLE_ROOT_OPTS = ... echo ... sleep 10
This gives zero exit code. Automated tools (like parallel-ssh) are mislead. Probably should be:
cloudinit/config/cc_ssh.py : DISABLE_ROOT_OPTS = ... echo ... sleep 10; exit 1

Ilya Sher (ilyash)
summary: - ssh connection to diabled root user exits with zero code
+ ssh connection to disabled root user exits with zero code
Revision history for this message
Scott Moser (smoser) wrote :

Thats an interesting suggestion.
I don't think there'd be any significant fallout of changing that in trunk.

fwiw, it is ocnfigurable, by setting 'disable_root_opts'
default value is:
DISABLE_ROOT_OPTS = ("no-port-forwarding,no-agent-forwarding,"
"no-X11-forwarding,command=\"echo \'Please login as the user \\\"$USER\\\" "
"rather than the user \\\"root\\\".\';echo;sleep 10\"")

Changed in cloud-init:
status: New → Triaged
importance: Undecided → Low
Changed in cloud-init:
assignee: nobody → Vladimir Novikov (vnovikov)
Johnson Shi (johnsonshi)
Changed in cloud-init:
assignee: Vladimir Novikov (vnovikov) → Johnson Shi (johnsonshi)
status: Triaged → In Progress
Johnson Shi (johnsonshi)
Changed in cloud-init:
assignee: Johnson Shi (johnsonshi) → nobody
Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Dan Watkins (oddbloke) wrote :
Changed in cloud-init:
status: In Progress → Fix Committed
Revision history for this message
James Falcon (falcojr) wrote : Fixed in cloud-init version 20.3.

This bug is believed to be fixed in cloud-init in version 20.3. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers