Bug #1164
sshkey type is creating invalid ssh_known_hosts file
| Status: | Closed | Start date: | ||
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
In 0.24.4 I am using the sshkeys type like so:
@@sshkey { $hostname: type => rsa, key => $sshrsakey }
Sshkey <<| |>>
The file that is created looks like this:
d65 ssh-rsa ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA0lpvC7a0w1c6dCYBVWfsbPI2A8WW/7/CFdSnU3vIOTFb25/XB/hnz8+ZqLAawAybokCCA2aF6sHKs7Aa2AAG0BLGmZHDI4I1ca5p01r+6C6N62MKZHWvsu7dOv+Ii3s5RGT85rEnnNr2T636gVew9jN8vogRW/rHseunocqgqV/JIUuwZocr6z8pIUQjIos2nNB1u4VqkSjG7r49QU1PFPhlg5C3Q7VeIgH1A9FfAb0Pqcx8qARj5P+V7sNZsvk3F6aSW3Oh9sumMzsfauTATtaXTHcKfmdB5h8VwzbbGIr0IpJeHkpaqvIM3JdmvbRCFDYCy5D8VRfENKV7awPR2w== root@d65 admin ssh-rsa ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAxV9yiDdYaVdqjrUlNjvyF9QmJV96VwntJB+6i4620z8RH6gBu7qAggvSL/3oZ9aKG60/c97/fIpXxSnOF3sNRsk/o5rGNVZ6zbrHQVdMQ/qogitEVfSQxYtndQPn6+bXVaYgirAVynfcLgmBNwjZoGObEJ/cjX5NVXFPmtJou48= root@d14
As you can see, this is an invalid format. The ‘ssh-rsa’ is repeated, causing ssh to give this error:
d65:~# ssh admin key_read: uudecode ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAIEAxV9yiDdYaVdqjrUlNjvyF9QmJV96VwntJB+6i4620z8RH6gBu7qAggvSL/3oZ9aKG60/c97/fIpXxSnOF3sNRsk/o5rGNVZ6zbrHQVdMQ/qogitEVfSQxYtndQPn6+bXVaYgirAVynfcLgmBNwjZoGObEJ/cjX5NVXFPmtJou48= root@d14 failed
History
Updated by James Turnbull about 4 years ago
I can’t replicate this error. Running this configuration gives me a normally formatted ssh_known_hosts.
What platform is this? Anything odd about it?
Updated by Paul Lathrop about 4 years ago
Debian Etch with some backported packaged (Puppet among them).
Nothing odd that I can put a finger on. I’ll hammer on this and see if I can reproduce it in a VM…
Updated by Bryan McLellan about 4 years ago
This happened to me too.
type => rsa adds ‘ssh-rsa’, so if you have ‘ssh-rsa’ in $sshrsakey along with the key itself, you’ll end up with it twice. I removed ‘ssh-rsa’ from my key variable and all was well.
Updated by Luke Kanies about 4 years ago
- Status changed from 1 to Closed
- 7 set to worksforme