OpenVPN secret keys
To secure the OpenVPN connection, a secret key is needed. First, we will generate such a key. Then, it needs to be copied to the remote endpoint using a secure channel (example SCP:
$ openvpn --genkey --secret secret.key
Note that it is not necessary to run this command as root (hence the prompt $
). The resulting secret key file has the following format:
# # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- 1393ae687606c1f7d465d70227bf63e8 8963e9d1401450002d073d6eab1bffde b06d1a33cc5c45d4a667016339e921d3 3ac36b1a949eb52e9217e41e4b035a7b 987ddfa9d6766d3b5e4c952dc27f518d 12ccff6b2f0966284382ddc0f62b824a f576f0982beec9d6a4728d0788499a75 0fd7055ef681404fd463d9862d3a40a9 31fca7d87997c70c07b8303a1b85f1ff 76aa7790e7c341353d2b4ea5049b11a2 51346e7dd39fc1f1e53ae57c46cf60c8 24db00a871262fee78050a9df6a57322 0bb0d980b6cf1be90a2f304f99fb9cde 7cdf72d20e7dee555c7c99950aa4d8e6 86a020c3a63125fb99d56181ff4ca20c d6711eab15a4d6faf706f2601eb6 61b7 -----END OpenVPN Static...