Created
April 7, 2020 02:40
-
-
Save droberson/7438583d4b25c55736e9a2d6f45b9eeb to your computer and use it in GitHub Desktop.
Revisions
-
droberson created this gist
Apr 7, 2020 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/bin/sh # This will generate a keypair for each command line argument: # # Create keys named "daniel", "jacob", and "whitley" # % generate-lots-of-ssh-keypairs.sh daniel jacob whitley # # Create 100 numbered keys # % generate-logs-of-ssh-keypairs.sh $(seq 100) for name in $@; do echo | ssh-keygen -f $name -C ${name}@autogenerated >/dev/null -f ~/.ssh/${name} 2>/dev/null if [ $? != 0 ]; then echo "[-] Key exists: $name" else echo "[+] Created $name" fi done