ssh-keygen
Take a copy of the key text from /home/username/.ssh/authorized_keys. This should just be the key part not the ssh type or user and hostname. Also take a copy of the type and the user and hostname part.
Within puppet do the following:-
ssh_authorized_key {
"andy@ahibbert":
ensure => present,
user => andy,
type => "ssh-rsa",
key => "AAAAB....."
}
In the above the details from the authorized_keys file are found:-
- andy@ahibbert - user and hostname I'm ssh'ing from
- type - the ssh type I am using
- key - the public ssh key
puppet apply auto_ssh.pp
You should know be able to ssh without a password