Add chef-keygen
Jes Olson jolson@digitalocean.com
Tue, 08 Feb 2022 15:46:08 -0600
1 files changed,
7 insertions(+),
0 deletions(-)
jump to
A
bin/chef-keygen
@@ -0,0 +1,7 @@
+#!/bin/sh + +key=$(openssl genrsa 2048 2>/dev/null) +pubkey=$(printf "%s" "$key" | openssl rsa -pubout) +pubkey_newline=$(printf "%s\n" "$pubkey" | tr '\n' '}' | sed 's/}/\\n/g') + +printf "%s\n%s\n%s\n" "$key" "$pubkey" "$pubkey_newline"