Posted: . At: 1:27 PM. This was 9 years ago. Post ID: 8219
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Set or change a passphrase for an OpenVPN server key.


This command will set a passphrase for the server pem file for OpenVPN on Linux. I setup a VPN configuration on Ubuntu and forgot to set the passphrase. This is how I managed to set one.

ubuntu@ip-172-31-13-140:~$ sudo openssl rsa -des3 -in server-key.pem -out server2.pem
Enter pass phrase for server-key.pem:
writing RSA key
Enter PEM pass phrase:
Verifying - Enter PEM pass phrase:

Then I overwrote the original server pem file in /etc/openvpn and restarted the service and all was good.

ubuntu@ip-172-31-13-140:~$ sudo service openvpn restart
* Stopping virtual private network daemon(s)...                                                                 
*   Stopping VPN 'udp1194'                                                                  [ OK ]
* Starting virtual private network daemon(s)...                                                                 
*   Autostarting VPN 'udp1194'                                                                                 
Enter Private Key Password:

This means that you must enter the password every time that the service is restarted, but the security implications of this greatly outweigh any annoyance this would cause.


3 thoughts on “Set or change a passphrase for an OpenVPN server key.”

  1. I’d just like to interject for a moment. What you’re refering to as Linux, is in fact, GNU/LInux, or as I’ve recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

    Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called “Linux”, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

    There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine’s resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called “Linux” distributions are really distributions of GNU/Linux.

    Reply
  2. I forgot my private key password that is PEM passphrase key. I want to set new or make my vpn without PEM passphrase can anybody help me in this issue?

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.