-
SSH into the VPN server:
ssh [email protected] -i ~/.ssh/privatvpnkey.pem
-
Switch to the root user:
sudo su -
-
Run the VPN user creation script with the username (replace
andreyb
with the desired username):./createuservpn.sh andreyb
As a result, you will receive the path to the OpenVPN configuration file:
Client configuration file created: /root/client-configs/andreyb.ovpn
-
Copy the content of the configuration file or transfer the file to your local machine using
scp
:- To display and copy the file content:
cat /root/client-configs/andreyb.ovpn
- To display and copy the file content:
-
Create a connection profile in the OpenVPN client using the configuration file.
- Ensure you have proper permissions and access to the server and
.pem
file. - Replace
andreyb
with the desired username for the VPN.