Create a New SSH User with Webmin
This guide shows you how to create a new SSH user through the Webmin control panel. You’ll learn the exact clicks to add a user, set a password, and grant SSH access—without touching the command line. You’ll need Webmin already installed and accessible via your browser, plus root or sudo privileges to log in.
What You’ll Need
- A server with Webmin installed (version 1.900 or newer recommended).
- The Webmin URL (usually
https://your-server-ip:10000) and login credentials for a user with root or sudo access. - An SSH client (like PuTTY or the terminal) for testing the new login after creation.
Step-by-Step
- Log in to Webmin – Open your browser, go to your Webmin URL, accept the self-signed certificate warning if it appears, and enter your admin username and password.
- Navigate to the Users module – In the left sidebar, click on System to expand the menu, then click Users and Groups. This opens the main user management screen.
- Create a new user – Click the Create a new user button (usually near the top of the page). This opens the user creation form.
- Fill in the basic details – In the Username field, enter the desired login name (e.g.,
john). In the Real name field, you can optionally enter the person’s full name. Leave the User ID as Automatic unless you have a specific UID in mind. - Set the home directory – For Home directory, choose Create new home directory and leave the path as the default (usually
/home/username). This ensures the user has a place to store files. - Set the shell – In the Shell dropdown, select
/bin/bash(or the default shell you prefer). This gives the user a functional command-line environment. - Set a password – Scroll to the Password section. Choose Set password to and type a strong password twice. Alternatively, you can select Generate random password and Webmin will create one for you—make sure to copy it before saving.
- Configure group membership – In the Groups section, you can add the user to supplementary groups. For a standard SSH user, leave the primary group as the default (usually a group with the same name as the username). If you want admin privileges, add them to the
sudoorwheelgroup, but be cautious. - Enable SSH access – Scroll down to the SSH access section (or Access control depending on your Webmin version). Ensure the option Allow SSH access is checked. If you see a field for SSH public key, you can paste a key here for key-based authentication, but it’s optional for password login.
- Create the user – Click the Create button at the bottom of the form. Webmin will create the user, set the password, and create the home directory. You’ll see a confirmation page.
- Test the login – Open your SSH client and try to connect using the new username and password. For example:
ssh john@your-server-ip. If it connects, you’re done.
Common Mistakes
- Forgetting to check the SSH access box – If the user can’t log in via SSH, this is the most likely cause. Double-check that the option is enabled.
- Using a weak password – A short or common password is a security risk. Use a long passphrase or generate a random one.
- Not creating the home directory – If you choose Do not create home directory, the user may have issues with permissions or tools that expect a home folder.
- Setting an incorrect shell – If you set the shell to
/bin/falseor/usr/sbin/nologin, the user won’t be able to log in via SSH at all. Use/bin/bashor similar. - Adding to the sudo group by mistake – If you accidentally give the user admin privileges, they can change system settings. Only add to sudo/wheel if intended.
Tips
- Use SSH keys instead of passwords – For better security, generate a key pair on your local machine and paste the public key into the SSH public key field during creation.
- Set an expiry date – If this is a temporary user, you can set an Account expiry date in the user creation form to automatically disable the account later.
- Keep a record of the password – If you use a generated password, copy it to a secure password manager before clicking Create.
- Check the SSH configuration – If your server has disabled password authentication in
/etc/ssh/sshd_config, the user won’t be able to log in with a password. In that case, you’ll need to use key-based auth.
Troubleshooting
- User can’t log in – First, verify that the SSH access box is checked. Then, check if the shell is set correctly. Also, confirm that the password was set (try resetting it in Webmin). If the server has
AllowUsersorDenyUsersdirectives insshd_config, make sure the new user isn’t blocked. - Permission denied when trying to log in – This usually means the password is wrong or SSH access is disabled. Reset the password in Webmin and try again. If you’re using a key, ensure the public key is correctly pasted in the user’s
~/.ssh/authorized_keysfile. - User created but home directory missing – This can happen if the home directory path was manually set incorrectly. Edit the user in Webmin, change the home directory to a valid path, and create the directory manually with
mkdirif needed. - Webmin shows an error when creating the user – The most common cause is a username that already exists or an invalid character. Try a different username, or check the system logs (
/var/log/messagesor/var/log/syslog) for details.
Frequently Asked Questions
Can I create an SSH user without a password?
Yes, you can leave the password field blank and rely solely on SSH keys. In the user creation form, choose No password and paste the public key. The user will only be able to log in with the corresponding private key.
How do I give the new user sudo privileges?
During creation, in the Groups section, add the user to the sudo group (on Debian/Ubuntu) or the wheel group (on RHEL/CentOS). Alternatively, you can edit the user later and modify their group membership.
What if I want to restrict the user to SFTP only?
You can set the user’s shell to /usr/sbin/nologin or /bin/false and configure an SFTP chroot in your SSH server’s configuration. This is more advanced and usually done via the command line.
Can I create multiple users at once?
Webmin doesn’t have a bulk-create feature in the standard interface. You can create users one by one, or use a script on the command line for mass creation.
How do I change a user’s password after creation?
In Webmin, go to System > Users and Groups, click the username, then click Change Password. Enter the new password and save.
Is it safe to create SSH users via Webmin?
Yes, Webmin uses the system’s standard user management tools, so it’s as safe as using useradd or adduser directly. Just ensure your Webmin login is protected with a strong password and HTTPS.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.