Generate FIPS compliant SSH keys
Generate FIPS compliant SSH keys required for testing system FIPS mode support
This commit is contained in:
parent
38f9687cc1
commit
991293a897
2 changed files with 3 additions and 1 deletions
|
|
@ -260,6 +260,8 @@ func WithSSHKeyPair(f func(privateKey, publicKey string) error) error {
|
|||
cmd := exec.Command("ssh-keygen",
|
||||
"-N", "",
|
||||
"-f", privateKey,
|
||||
"-t", "rsa-sha2-256",
|
||||
"-b", "2048",
|
||||
)
|
||||
|
||||
err := cmd.Run()
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Create SSH key
|
||||
SSH_DATA_DIR="$(mktemp -d)"
|
||||
SSH_KEY=${SSH_DATA_DIR}/id_rsa
|
||||
ssh-keygen -f "${SSH_KEY}" -N "" -q -t rsa
|
||||
ssh-keygen -f "${SSH_KEY}" -N "" -q -t rsa-sha2-256 -b 2048
|
||||
|
||||
# Change cloud-init/user-data ssh key
|
||||
key=" - $(cat "${SSH_KEY}".pub)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue