How to manage users in PiVPN
This article covers some of the commands that you will need to manage users in PiVPN via SSH. See this list to check of the best SSH clients out there.
Here’s a list of commands that will help you manage users in PiVPN:
Access PiVPN Command-line Interface
- Open a terminal on your Raspberry Pi.
- Log in as the user who installed PiVPN or use the “
sudo -i
” command to run commands with root privileges.
List Existing Users
To list the existing users in PiVPN, run the following command:
pivpn -l
This will display a list of all the users configured in PiVPN.
Add a User
To add a new user, run the following command:
pivpn add
You will be prompted to enter a name for the new user. Choose a descriptive name.
Revoke a User
If you want to revoke access for a user and remove their configuration, run the following command:
pivpn revoke
You will be prompted to select the user from a list. Choose the user you want to revoke.
Display User Details
To display the details of a specific user, including their assigned IP address and connection status, run the following command:
pivpn -c
You will be prompted to select the user from a list. Choose the user whose details you want to display.
Reset a User’s Password
If you need to reset a user’s password, run the following command:
pivpn -p
You will be prompted to select the user from a list. Choose the user whose password you want to reset. You will then be prompted to enter a new password.
Update PiVPN
To update PiVPN to the latest version, run the following command:
pivpn -up
This will update PiVPN and its dependencies to the latest available version.
That’s it! You now have the basic steps to manage users in PiVPN using the PiVPN command-line interface.