packer-cn/cmd
Adrien Delorme b24911661f
add sshkey package and ssh-keygen comand (#10101)
* add sshkey.Generate function that returns an sshkey.Pair to be used with openssh.
* add cmd/ssh-keygen/main.go for testing purposes
* add a test calling ssh.ParsePrivateKey & ssh.ParseAuthorizedKey (which is very
   similar to what openssh would do to read a keypair)

The wrapping of the keys should be handled by crypto/x509.MarshalPKCS8PrivateKey 
& x/crypto/ssh.NewPublicKey which does not work for ed25519 and dsa. 
x509.MarshalPKCS8PrivateKey marshals ed25519 keys but the keys did not work with openssh. 
x509.MarshalPKCS8PrivateKey does not handle dsa keys.
So I had to 'wrap' those manually by reading the code of the openssh package.
Note that ssh.NewPublicKey works with any keytype. I should probably do a PR to ssh to have a NewPrivateKey & Marshalling funcs
2020-10-19 10:24:34 +02:00
..
generate-fixer-deprecations fix generator to work even in nested packer/packer dirs 2020-08-06 13:24:15 -07:00
mapstructure-to-hcl2 HCL2: generate hcl tags with go-cty tags too (#9306) 2020-05-28 11:19:00 +02:00
snippet-extractor snippet-extractor: better docs 2020-07-16 15:49:44 +02:00
ssh-keygen add sshkey package and ssh-keygen comand (#10101) 2020-10-19 10:24:34 +02:00
struct-markdown 📌 Hard Pin Website Dependencies (#9543) 2020-07-13 12:33:16 +02:00