alpha
Login
or
Join now
j3s.sh
/
dotfiles
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
my dotz
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
Add chef-keygen
author
Jes Olson
date
4 years ago
(Feb 8, 2022, 3:46 PM -0600)
commit
648e0efe
648e0efedcf44a4c93c86ce3489595fcbbba10df
parent
0601d518
0601d51819bc28a7ddcea48af6a352070a5ae397
+7
1 changed file
Expand all
Collapse all
Unified
Split
bin
chef-keygen
+7
bin/chef-keygen
Reviewed
···
1
1
+
#!/bin/sh
2
2
+
3
3
+
key=$(openssl genrsa 2048 2>/dev/null)
4
4
+
pubkey=$(printf "%s" "$key" | openssl rsa -pubout)
5
5
+
pubkey_newline=$(printf "%s\n" "$pubkey" | tr '\n' '}' | sed 's/}/\\n/g')
6
6
+
7
7
+
printf "%s\n%s\n%s\n" "$key" "$pubkey" "$pubkey_newline"