Last active
December 28, 2015 22:49
-
-
Save schnell18/7574519 to your computer and use it in GitHub Desktop.
Bash script to generate SSH public/private key pairs for a bunch of users.
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
#!/bin/sh | |
# read the user name from stdin line by line | |
while read u | |
do | |
rm -f ${u} | |
rm -f ${u}.pub | |
ssh-keygen -t rsa -b 2048 -N "" -C "SSH keypair for $u" -f ${u} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment