Bug #2812

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

Added by Matt Peterson about 2 years ago. Updated about 2 years ago.

Status:Closed Start date:11/13/2009
Priority:Normal Due 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:
Votes: 0

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 (5.2 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

Updated by Markus Roberts about 2 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.

Updated by Matt Peterson about 2 years ago

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

Updated by Markus Roberts about 2 years ago

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

Updated by Jesse Wolfe about 2 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

Updated by James Turnbull about 2 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