iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
To create an SSH-capable Ubuntu account, create the account with sudo adduser username, add it to Ubuntu’s sudo group with sudo usermod -aG sudo username, install the user’s public key in ~/.ssh/authorized_keys, and apply the required ownership and permissions. Verify the account with id username, then open a second SSH session and run sudo -v before ending your existing session.
What you need before starting
You need an Ubuntu server that you can already reach over SSH and an account with permission to run sudo. You also need the new user’s public SSH key if the account will authenticate with a key. Keep your current SSH connection open until the new account has successfully logged in and passed a sudo check.
The commands below use username as a placeholder. Replace it with the actual login name, using the same spelling in every command. Do not include angle brackets when you type the name.
- An existing SSH connection to the Ubuntu server.
- An account that can run commands with
sudo. - A unique name for the new account.
- The new user’s public key, copied as a single line.
Step 1: Create the Ubuntu user
Run:
sudo adduser username
Ubuntu will ask you to set a password and then present optional account-information fields. Enter the password, press Enter through optional fields you do not need, and confirm the details when prompted. The account is created before you configure SSH key access or additional group membership.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.
The adduser command is the convenient, interactive choice for this procedure. A comparison guide describes useradd as a low-level binary compiled with the system and adduser as a higher-level Perl script built on top of useradd. That distinction matters here because adduser walks you through the password and optional fields instead of requiring you to assemble all account settings manually.
Step 2: Give the user sudo access
Add the account to Ubuntu’s sudo group:
sudo usermod -aG sudo username
The -G option selects supplementary groups. The -a option appends the selected group rather than replacing the user’s existing supplementary groups. Omitting -a can remove groups that were already assigned to the account, so keep the option exactly as shown.
Recommended Free Tools
On Ubuntu, membership in the sudo group provides sudo privileges by default. The membership change applies to new login sessions; that is why the verification step uses a separate SSH connection rather than relying only on the shell that was open while you ran usermod.
Step 3: Prepare the user’s SSH directory
SSH looks for the account’s authorized public keys in the user’s home-directory path, inside .ssh/authorized_keys. Create the directory and key file as the new user when possible. If you create them with sudo, correct the owner before testing the login.
From an administrative shell, the following sequence creates the directory and file:
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
sudo mkdir -p /home/username/.ssh
sudo touch /home/username/.ssh/authorized_keys
sudo chown -R username:username /home/username/.ssh
sudo chmod 700 /home/username/.ssh
sudo chmod 600 /home/username/.ssh/authorized_keys
If the account’s home directory is elsewhere, use that actual path instead of /home/username. You can also switch to the new account and use its home-relative path:
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, 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 minutesudo -iu username
mkdir -p ~/.ssh
touch ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
When you use the second method, the files are created in the new user’s home context. If an administrator created them first, the chown command in the first sequence ensures that both the directory and file belong to the account that will log in.
Step 4: Set the required ownership and permissions
Use these values as the target state:
| Path | Owner | Mode | Purpose |
|---|---|---|---|
~/.ssh |
the new user | 700 |
Private SSH configuration directory |
~/.ssh/authorized_keys |
the new user | 600 |
File containing accepted public keys |
Mode 700 gives the user full access to the .ssh directory while preventing access by other accounts. Mode 600 gives the user read and write access to authorized_keys. Community SSH guides identify incorrect ownership or permissions as a common reason that key-based login is rejected, so check both values before debugging the client.
To inspect the resulting metadata, run:
ls -ld /home/username/.ssh
ls -l /home/username/.ssh/authorized_keys
The listing should show the directory and file owned by username, with the directory set to drwx------ and the file set to -rw-------. If the owner is shown as root, run:
sudo chown -R username:username /home/username/.ssh
Step 5: Add the public key
Open the key file as the new user or with administrative privileges:
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
sudo nano /home/username/.ssh/authorized_keys
Paste the complete public key on one line, then save the file. Each additional public key must occupy its own line. Do not split a key across lines, and do not paste the private key into this file. The file is named authorized_keys because each line represents a public key that the account may use for authentication.
After saving, reapply the ownership and mode if you edited the file as an administrator:
sudo chown username:username /home/username/.ssh/authorized_keys
sudo chmod 600 /home/username/.ssh/authorized_keys
If you are adding several keys, append each complete public key as a separate line rather than replacing the existing entries. This lets the account retain previously authorized keys while adding another login device.
Step 6: Verify account and group membership
Check that the account exists and that it is a member of the expected groups:
Free tools Windows power users keep installed
One-click scans. No signup required.
id username
Read the output for the account name and the sudo group. If sudo is missing, repeat the group command and inspect the result again:
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
sudo usermod -aG sudo username
id username
Do not close your original administrative SSH session yet. The id command confirms the local account and group assignment, but it does not prove that public-key authentication works from your client or that the new session can use sudo.
Step 7: Test SSH access without risking your current session
Open a second terminal and connect to the server using the new login name and the corresponding private key. Keep the original session open while you test. In the new session, run:
sudo -v
This asks sudo to validate the account’s credentials without running an administrative command. A successful check demonstrates that the account can authenticate over SSH and use its assigned sudo privileges. Only after this succeeds should you close the original session.
If the account was created with a password and you are testing password authentication, enter the password selected during adduser. If you are testing the public key, ensure that the client is offering the private key corresponding to the public-key line in authorized_keys. The server-side file must contain the public half; the private half remains on the client.
Complete command sequence
For an administrator who wants the procedure in one place, this is the condensed sequence. Replace both instances of username and substitute the correct public key when editing the file:
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
sudo adduser username
sudo usermod -aG sudo username
sudo mkdir -p /home/username/.ssh
sudo touch /home/username/.ssh/authorized_keys
sudo chown -R username:username /home/username/.ssh
sudo chmod 700 /home/username/.ssh
sudo chmod 600 /home/username/.ssh/authorized_keys
sudo nano /home/username/.ssh/authorized_keys
id username
After the key is pasted and saved, start a second SSH session as username and run sudo -v. The sequence deliberately leaves verification until after ownership, modes and key content have been set.
Troubleshooting failed logins
The account cannot log in with its public key
- Confirm that the public key is present in
authorized_keysand occupies one complete line. - Confirm that
~/.sshis mode700andauthorized_keysis mode600. - Confirm that both paths are owned by the new user, not by
rootor another account. - Check that the client is using the private key paired with the public key you pasted.
The user can log in but sudo fails
- Run
id usernamefrom the existing administrative session and confirm thesudogroup is listed. - If you added the group after the user was already logged in, end that test session and start a new SSH session so the updated group membership is loaded.
- Run
sudo -vin the new session and enter the password created byadduserif prompted.
The account was created with the wrong group state
Use sudo usermod -aG sudo username again. The append flag is important because the intended change is to add sudo membership without replacing other supplementary groups.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →You lost access during testing
Keep the original SSH connection open until the second session has completed both authentication and sudo -v. If the original session is still open, use it to inspect the account, repair ownership or permissions, and repeat the test. Closing the only administrative session before verification removes that recovery path.
adduser and useradd: which command should you use?
| Command | Description in the available Ubuntu guide | Role in this procedure |
|---|---|---|
adduser |
Higher-level Perl script built on top of useradd |
Recommended here because it interactively collects the password and optional fields |
useradd |
Low-level binary compiled with the system | Underlying account-creation utility; not needed for the interactive sequence above |
These descriptions come from a Medium guide titled “Ubuntu Server 101,” whose author was not identified in the returned result. For this task, the practical choice is adduser, followed by the explicit group, key-file and permission steps shown above.
Ubuntu version considerations
A third-party walkthrough titled for Ubuntu 26.04 says the same commands apply, but that version-specific behavior was not confirmed by official Ubuntu release notes in the available material. Treat the commands as the general Ubuntu procedure and verify behavior on the exact image or release you administer. The essential checks remain the same: account creation, sudo group membership, key-file content, ownership, modes and a second-session sudo -v test.
Operational checklist
- Create the account with
sudo adduser username. - Set and record the password during the interactive prompts.
- Add the account with
sudo usermod -aG sudo username. - Create
~/.sshandauthorized_keys. - Paste one complete public key per line.
- Set the directory to mode
700and the key file to mode600. - Make the new user the owner of both paths.
- Run
id usernameand confirm thesudogroup. - Open a second SSH session as the new user.
- Run
sudo -vin that session before closing the original connection.
What this procedure does—and does not change
This procedure creates a separate Ubuntu login, grants that account membership in the default sudo group, and authorizes the public key placed in its own authorized_keys file. It does not require a physical product or a separate service; an existing Ubuntu server with SSH access is the prerequisite. It also does not replace the existing administrative account, which is why retaining the original session during verification is an important recovery measure.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.

