Create a named account, grant the administrative group used by your Linux distribution, and verify it from a second SSH session before changing root-login settings. Keep your existing root or administrator connection open throughout: it is your recovery path if the new account, SSH key, group membership, or sudo policy is wrong.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What you need before you start
You do not need a paid product to complete this procedure. The distribution’s account utilities, OpenSSH, sudo, and configuration files are sufficient. Have these items ready:
As an Amazon Associate I earn from qualifying purchases.
- An open root or known-good administrator SSH session, or access to the VPS provider’s console.
- The distribution identity from
/etc/os-release. - A unique login name for the new person or service.
- The user’s real SSH public key if key authentication will be used.
- A second terminal for testing, so the original privileged session remains untouched.
Do not begin by closing root access or editing SSH policy. Build and verify the replacement path first.
What you are going to do
The safe sequence is:
- Keep the current privileged SSH session open.
- Identify the VPS distribution.
- Create the user and home directory.
- Add the user to the distribution’s normal administrative group.
- Set up a password or SSH public key.
- Reconnect as the new user so the group change is loaded.
- Check group membership and the effective sudo policy.
- Test a second SSH connection before disabling direct root login or password authentication.
Debian and Ubuntu normally use the sudo group. Red Hat Enterprise Linux and related distributions normally use wheel, but the group only grants access when the image’s sudoers policy authorizes it. A group name alone is not proof that sudo will work.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
1. Identify the Linux distribution
From your existing root or administrator shell, run:
cat /etc/os-release
Read the ID, ID_LIKE, and version fields. Cloud images can include provider-specific changes, so do not assume that every distribution has the same account commands or sudo policy. The commands below cover the normal Debian-family and RHEL-family arrangements.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
2. Create the account
Ubuntu and Debian
Ubuntu documentation says Debian-based systems encourage the adduser package for account management. Run:
sudo adduser username
Replace username with the actual login name. The interactive prompts create the account and home directory, ask for a password, and optionally collect descriptive fields. Press Enter through fields you do not need. On a root shell, the leading sudo is optional; retaining it makes the command usable from an existing administrative account that already has sudo rights.
Confirm that the account was created and inspect its identity:
id username
getent passwd username
The output should show a numeric user ID, a primary group, and a home directory, normally /home/username. If the account already exists, do not run account-creation commands again; continue by checking its groups and login configuration.
Recommended Free Tools
RHEL, Fedora, and other RHEL-family images
The exact account utility can vary by image. A common non-interactive sequence is:
sudo useradd -m -s /bin/bash username
sudo passwd username
-m creates the home directory and -s /bin/bash selects the login shell. Set a password only if your SSH policy permits password authentication or you need a console fallback. If the provider image already supplies an account-management tool or a preconfigured shell, preserve those image-specific settings instead of replacing them without checking.
Verify the account:
id username
getent passwd username
3. Grant administrative access using the distribution’s group
Debian and Ubuntu: add the user to sudo
Ubuntu documents this form:
sudo adduser username sudo
The equivalent usermod command is:
sudo usermod -aG sudo username
The -aG options append the user to the supplementary group. Do not omit -a: using -G without append can replace the user’s existing supplementary groups, potentially removing access they still need.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
On Debian-family systems, membership in sudo is the normal authorization path, provided the sudoers policy grants that group permission to run commands.
RHEL-family systems: add the user to wheel
Run:
sudo usermod -aG wheel username
Red Hat documents wheel as the administrative group whose authorization is defined in sudoers. Check the image before assuming that a wheel rule exists. Sudo policy is stored in /etc/sudoers and files under /etc/sudoers.d/; a hardened or customized image may grant a different group, require a password, or restrict commands.
Check the group before logging in
From the administrator session, run:
id username
You may see the new group immediately in this command, but an already-open login shell for that user will not necessarily receive it. Group information is established when a session starts. Plan to log out and reconnect, or open a completely new SSH connection.
4. Choose password and SSH-key access
Password login
A password is useful as a controlled fallback, especially when you have provider-console access, but whether it can be used over SSH depends on the VPS image and the SSH daemon’s policy. Never assume that setting a password enables password authentication. Test the configured method from a separate terminal while the original privileged session remains open.
Public-key login
For routine VPS administration, a named account with an SSH public key is easier to attribute than shared root credentials. OpenSSH looks for the user’s public key in ~/.ssh/authorized_keys. From the existing administrator session, copy the user’s real public-key file to the new home directory. For example, if the key has first been uploaded as /tmp/username_ed25519.pub:
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →sudo install -d -m 700 -o username -g username /home/username/.ssh
sudo install -m 600 -o username -g username /tmp/username_ed25519.pub /home/username/.ssh/authorized_keys
The directory and file must belong to the new user. Mode 700 on .ssh and mode 600 on authorized_keys prevent other users from reading or modifying the key list. Confirm that the public-key text is complete, remains on one line, and matches the private key held by the person connecting.
Some provider images use cloud-init or a preinstalled account with special SSH settings. Preserve any working configuration until the new key has been tested. Do not remove the only known-good key or close the original administrator session first.
5. Start a fresh session and verify sudo
Reconnect instead of reusing the old shell
Log out of any session that was opened as username, then open a new SSH connection as that user. Alternatively, open a second terminal and connect without touching the original administrator window. This refreshes supplementary-group data and tests the real authentication path.
Once logged in as the new user, run:
id
sudo -l
The first command should show sudo on Ubuntu or Debian, or wheel on a normally configured RHEL-family host. sudo -l displays the policy that applies to the current login, including whether all commands or only selected commands are allowed.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallRank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
To validate credentials without changing the system, run:
sudo -v
This checks or refreshes sudo authentication. If it succeeds, run a harmless read-only command such as:
sudo id
The result should show uid=0(root). The exact prompt behavior and command list depend on the host’s sudoers policy; a successful group lookup does not by itself guarantee unrestricted root access.
6. Test SSH before hardening root access
Open a second terminal and connect using the new account and its intended authentication method. Test all of the following before changing SSH settings:
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →- The key or password is accepted.
- The session starts in the expected home directory and shell.
idshows the expected administrative group.sudo -lreturns a policy rather than an authorization error.sudo -vorsudo idsucceeds.
Only after these checks should you consider disabling direct root login or password authentication. Make one SSH-policy change at a time, keep the original session open, and reconnect again after each change. If a setting breaks access, the still-open privileged shell or provider console is your recovery route.
7. Use a direct sudoers rule when group access is too broad
Adding a user to sudo or wheel usually grants the administrative rights defined for that entire group. If the account should run only a small set of commands, create a per-user drop-in instead of broad group membership.
Open a dedicated file with visudo:
sudo visudo -f /etc/sudoers.d/username
visudo validates syntax before saving. A full-access rule is:
username ALL=(ALL) ALL
This gives the named account the ability to run all commands through sudo, subject to the rest of the policy. A constrained rule must name the exact executable paths and arguments required by the job. Do not grant a shell, an editor, an interpreter, or a wildcard path merely because it appears convenient: many programs can be used to reach a broader root shell.
Use a drop-in for a narrowly defined maintenance task, automation account, or temporary exception. Check the result from the user’s fresh login with sudo -l. Remove obsolete rules after the task ends.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Never overwrite /etc/sudoers with an ordinary editor. A syntax error can remove administrative access. A validated drop-in is easier to review and remove than an untracked change to the main policy file.
8. Why “not in the sudoers file” appears
The user has not reconnected
Adding a group does not rewrite the groups of an existing process. Log out and open a new SSH connection. Running id in the old shell can continue to show the previous group list.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsThe wrong group was used
Check the distribution with cat /etc/os-release, then run id username from the administrator session. Debian and Ubuntu normally use sudo; RHEL-family systems normally use wheel. A group named similarly on a custom image may not have any sudo permission.
The group has no matching sudoers rule
Inspect the effective policy with sudo -l from a working administrator account and review /etc/sudoers plus the included files under /etc/sudoers.d/. The group must be explicitly authorized. Use visudo for any correction; never overwrite the main file with an ordinary editor.
A direct rule is malformed or does not match the login name
Run:
sudo visudo -c
Then check the drop-in filename, account spelling, host specification, and command paths. A rule for deploy does not authorize deployment, and a command-limited rule will correctly reject commands outside its list.
9. Troubleshoot common failures
sudo: command not found
The image may not have the sudo package installed, or the command may not be in the current PATH. Use the provider console or an existing root session to install the distribution’s sudo package from its configured repositories. Package names and repository procedures vary by image. Reconnect and run sudo -l after installation.
SSH returns “Permission denied (publickey)”
Check the key contents, the path, ownership, and permissions:
sudo ls -ld /home/username /home/username/.ssh
sudo ls -l /home/username/.ssh/authorized_keys
The home directory must be traversable by the account, .ssh must belong to the user and be private, and authorized_keys must contain the matching public key. Confirm that the SSH client is using the intended private key. Follow the service log while attempting a connection:
sudo journalctl -fu ssh.service
On images that name the service differently, use the provider’s documented SSH service name. Stop following the log with Ctrl+C after diagnosing the attempt.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
The key is correct but the account cannot log in
Check the shell and account state shown by:
getent passwd username
sudo passwd -S username
A disabled shell, locked account, incorrect home directory, or image-specific SSH restriction can block login independently of sudo. Correct the account setting from the existing privileged session, then test again.
Free tools Windows power users keep installed
One-click scans. No signup required.
You changed sudoers and lost access
Do not close every privileged session while editing authorization. Use the still-open root session or provider console, run visudo -c, and fix or remove the invalid drop-in. If no privileged session remains, use the VPS provider’s documented recovery console or rescue process rather than repeatedly guessing through SSH.
10. Choosing the authorization method
| Method | Scope | Best fit | Main risk or check |
|---|---|---|---|
sudo group |
All commands allowed by the Debian/Ubuntu group policy | Normal administrator account on Debian-family systems | Confirm the group rule exists and reconnect after adding membership |
wheel group |
All commands allowed by the RHEL-family wheel policy | Normal administrator account on RHEL-family systems | Do not assume a custom image authorizes wheel |
/etc/sudoers.d/username rule |
Only the commands and hosts named in the rule | Automation, delegated maintenance, or least-privilege access | Use exact paths and validate with visudo |
For login assurance, choose the method supported by the image: public key, password, or both. SSH authentication and sudo authorization are separate controls. A working key does not grant administrative rights, and membership in an administrative group does not fix a broken SSH key.
Operational checklist
- Keep one root or known-good administrator session open.
- Record the distribution and version from
/etc/os-release. - Create a named account with a home directory and valid shell.
- Add it to
sudoon Debian/Ubuntu orwheelon a normally configured RHEL-family image. - Install the public key with user ownership and restrictive permissions if using key authentication.
- Reconnect so group membership is refreshed.
- Run
id,sudo -l, and a harmlesssudo -vorsudo id. - Test a second SSH connection before disabling root login or password authentication.
- Use
visudofor every sudoers or drop-in edit. - Remove temporary accounts, keys, and command grants when they are no longer needed.
Frequently Asked Questions
Can I add the user while logged in as root?
Yes. The leading sudo is unnecessary in a root shell, but the same commands work. Keep that root or administrator session open until the new login and sudo test succeed.
Why does id username show sudo or wheel but sudo still fails?
The current login may predate the group change, or the image may not authorize that group in /etc/sudoers or an included file. Start a fresh SSH session and run sudo -l; then verify the group rule with visudo.
Free tools Windows power users keep installed
One-click scans. No signup required.
Should I use adduser or useradd?
Ubuntu and other Debian-based systems encourage the interactive adduser package. RHEL-family images commonly use useradd -m -s /bin/bash followed by passwd. Check the image’s existing account conventions first.
Does setting a password enable SSH password login?
No. The SSH daemon and provider image may disable password authentication even when the account has a password. Test the configured method separately and retain key or console access as a fallback.
What permissions should the SSH key files have?
Install .ssh as the new user with mode 700 and authorized_keys with mode 600. Confirm both are owned by the login account and that the public-key line is complete.
How do I grant only one administrative command?
Create a per-user file with sudo visudo -f /etc/sudoers.d/username and name the exact executable path and required arguments. Avoid wildcard paths, shells, editors, or interpreters that could provide broader root access.
What should I do before disabling root SSH login?
Use a second terminal to authenticate as the new user, confirm the expected shell and home directory, run id, sudo -l, and sudo -v or sudo id. Keep the original privileged session open while making one SSH-policy change at a time.
Is a paid service required for this setup?
No. The supported procedure uses the VPS image’s account tools, OpenSSH, sudo, and configuration files. A provider console is useful as a recovery path but is not a separate requirement when a working privileged session remains available.
The Bottom Line
The dependable pattern is a named user, the correct distribution-specific administrative group or a narrowly written sudoers drop-in, a fresh login, and a verified second SSH session. Keep the original privileged connection until every step works.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




