The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Bug #2812

ssh_authorized_key fails if existing non-puppet installed key file exists already

Added by Matt Peterson over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:11/13/2009
Priority:NormalDue date:
Assignee:Jesse Wolfe% Done:

0%

Category:ssh
Target version:0.25.2
Affected Puppet version:0.25.1 Branch:ticket/0.25.x/2812
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

Assuming the chunk of config…

ssh_authorized_key { “square_ssh_key”:

user => square,
ensure => present,
type => ssh-rsa,#    key => "AAAAB",
require => [Group["square"],User["square"]]

}

With an existing key deployed… [root@bastion home]# cat ~square/.ssh/authorized_keys | sed ’s/B3.*/…/g' ssh-rsa AAAA…

debug: //user_square/Ssh_authorized_key[square_ssh_key]: Changing ensure debug: //user_square/Ssh_authorized_key[square_ssh_key]: 1 change(s) notice: //user_square/Ssh_authorized_key[square_ssh_key]/ensure: created debug: Flushing ssh_authorized_key provider target /home/square/.ssh/authorized_keys debug: Finishing transaction 23542860530260 with 0 changes err: Got an uncaught exception of type ArgumentError: Field ‘name’ is required

However, removing the ssh file fixes this error. I tried various name directives with no attempt at fixing this. Cheers.

0001-Fixing-2812-authorized_keys-without-comments-fail.patch Magnifier (5.21 KB) Jesse Wolfe, 11/19/2009 09:38 am


Related issues

Related to Puppet - Bug #1531: ssh_authorized_keys should not use the key 'comment' as a... Accepted 08/25/2008

History

#1 Updated by Markus Roberts over 6 years ago

  • Status changed from Unreviewed to Investigating
  • Assignee set to Markus Roberts

I’m unclear on your last point; I’m assuming you mean that adding a name parameter didn’t resolve the issue.

#2 Updated by Matt Peterson over 6 years ago

Correct, regardless of the name parameter – existing authorized_keys files can’t be managed by puppet.

#3 Updated by Markus Roberts over 6 years ago

  • Assignee changed from Markus Roberts to Jesse Wolfe
  • Target version set to 0.25.2

#4 Updated by Jesse Wolfe over 6 years ago

  • Status changed from Investigating to In Topic Branch Pending Review
  • Branch set to ticket/0.25.x/2812

This patch fixes the reported bug without touching the more difficult underlying issue #1531

#6 Updated by James Turnbull over 6 years ago

  • Category set to ssh
  • Status changed from In Topic Branch Pending Review to Closed

Pushed in commit:9cfe390515b464acae8268c2688543a9d816734c in branch 0.25.x

Also available in: Atom PDF