Created
January 13, 2023 20:21
-
-
Save Mr-Saikiran/29148daf3da14376e5e25b9cea70424d to your computer and use it in GitHub Desktop.
Bash script for generating CSR with a privatekey
This file contains 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
### Author : Saikiran M | |
#!/bin/bash | |
while | |
read -p "DomainName :" site ; | |
do | |
# openssl req -newkey rsa:2048 -nodes -keyout $site.key -out $site.csr -subj "/C=US/ST=Minnesota/L=Eden Prairie/O=XYZORG INC./OU=IT/CN=$site/emailAddress=admin@email.com" | |
openssl genrsa -out $site.key 2048 | |
openssl req -new -sha256 -out $site.csr -key $site.key -subj "/C=US/ST=Minnesota/L=Eden Prairie/O=XYZORG INC./OU=IT/CN=$site/emailAddress=admin@email.com"" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment