Created
August 30, 2022 20:55
-
-
Save Mr-Bossman/8e9ae586d10bce82f210ec36ccb8c3c6 to your computer and use it in GitHub Desktop.
deterministic ssh-keygen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSH_PATH=$HOME/.ssh/id_rsa; read -ep "Enter file in which to save the key ($SSH_PATH): " -i $SSH_PATH SSH_PATH && echo "Enter seed passphrase: " && certtool --generate-privkey --outfile $SSH_PATH --key-type=rsa --sec-param=high --seed=$(perl -e '<>' | sha256sum | tr -d '-') && ssh-keygen -yf $SSH_PATH | sed "s/$/ $HOSTNAME/" > $SSH_PATH.pem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dependencies:
bash > 4.0
gnutls
ssh-keygen
perl
sha256sum
tr
sed