dcsobral/puppet-users — Issue #6: How to add multiple ssh keys to same user?
Author: soakes
Created: 2012-01-04 13:53:13+00:00
State: open

Hi there,

I hate to ask this here but I have been struggling for the past few hours in trying to get this module to support multiple ssh keys to one user.. example I have say 10 different keys on user support. No matter how I try and add the keys via csv its only ever adding one key.

What is the correct syntex/code to add an extra key to same user? i.e. what should the csv look like?

Below is a couple of examples I have tried..

simon_sshkey,no-X11-forwarding,ssh-rsa,AAAAB3NzaC1yc2EAAAADAQABAAABAQC08+qUElV8x2kEmsFVKiwcTBCLqh0yGz9vpsa5rYoHbUPm4kwoi1SzU4fRT5Od3pk6lLb5PUnHexP368rLXLNBHSMmcJoeM8MvFo8ppzsqwE3fZ78hA8tusv2KDszyhiEE/WGa01xL4gPfBP0rhdt8cNF3Q3Yvn0Mg3ydGArFGl9BoZRUfTM0vsGVgLs1uSDj5Jq6qw+JamU5tW2deZMpMng9lwBp0HmPilBGazUSBU03kLRo5CuiRC2jFWO4fvkOBk4iDbZ0phhGw81zDiI71yyIX4fa3T0Llx73IWzr5Z2i3zXpcIlLRZ470tFNEJC5/hO5h+spLAMargm1PAGtF,simon@topher
simon_sshkey,no-X11-forwarding,ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/kPwB3UUDcYX2dlqV8NbYRNgChL5maMQ6w2VaIv+PhqJf0n93jEkUziYOFMql0LCLPkZz65lnC9CoL794lKFk9fRPm+0e221CSMOI3Ac2qM/44nZ4joqUEPMtwUZ9P/sIkUaF+cOx4I669PT1bWQP5AssSh+nO7G/a8KZBVp03aaXp70PLqFz/+PLklskvknr/n72mIRVhSLIXIbMWHu5AHVyC1XZvHvqFjq/gmFjUqdqKIQ07gIRkjPsvhHAgsLrLWbcZS3iYTb4JZn5zhubdPJtz4zLoIaO1JvjCOpo56ZZoLMMZNGCv+UARVX5gGNGIYA4pVRb+CAciBn4T/mV root@alpha

I have also tried to call via masskeys and I just can't get any keys to work no matter how I write the csv it just errors. I was thinking maybe I could change the lookupkey $data line to look in the csv for more then one key if pressent i.e. simon_sshkey1, simon_sshkey2 etc but I can't seem to get it to take regex.. does anyone know of this possible fix or how should multi keys for same user be added?

Thanks in advance.

Simon