Created
October 29, 2011 01:49
-
-
Save josiahcarlson/1323978 to your computer and use it in GitHub Desktop.
Create an OpenVPN key and zip it up with encryption for sending to your users.
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
#!/bin/bash | |
# Toss me in your /easy-rsa/2.0 path to have a quick and easy way to generat | |
# a key for a new machine, automatically zipped with encryption into /tmp. | |
# Requires that you have the below lines uncommented as part of a pre-configured | |
# client.conf sitting in keys/ . | |
# cert CHANGEME.crt | |
# key CHANGEME.key | |
source ./vars | |
./build-key $1 | |
cat keys/client.conf | sed s/CHANGEME/$1/g > keys/$1.conf | |
cd keys | |
zip -e /tmp/$1.zip $1.* ca.crt | |
cd .. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment