Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →To disable root SSH access without locking yourself out, first create and test a separate administrator account that has working SSH authentication and sudo rights. Keep the current root or console session open, set the effective OpenSSH directive to PermitRootLogin no, validate the parsed configuration, reload the SSH service using your distribution’s documented service name, and test a new administrator connection before closing the old session.
Need a server to try this on? Antihost offers Linux VPS plans with NVMe storage, full root access and a 14-day free trial.
Ubuntu and Debian document that PermitRootLogin no blocks root login through SSH. The less restrictive value prohibit-password is not equivalent: it still permits root authentication with an SSH public key.
As an Amazon Associate I earn from qualifying purchases.
Why disable direct root SSH access?
Root is the unrestricted administrative identity on a Linux VPS. If an attacker obtains root credentials or a root private key, there is no privilege boundary left to cross. Requiring administrators to connect with individual accounts and then use sudo creates an auditable identity for routine work and removes direct root authentication from the SSH attack surface.
Disabling root SSH login does not disable the root account itself. Programs and administrators can still obtain root privileges through approved local mechanisms such as sudo. It also does not change console access, rescue environments, or provider recovery features; those are separate paths whose availability depends on the VPS provider.
#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.
What must be ready before changing SSH
A tested replacement administrator
Use an individual, non-root account rather than a shared administrative login. Confirm that the account can authenticate over SSH with the key or other method approved for your environment and can run a harmless command through sudo, for example:
sudo -v
sudo id -u
The second command should return 0. If either command fails, do not disable root SSH yet. Fix the account, its SSH key, its password or multifactor method, and its sudo policy first.
Windows 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 reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchAn independent recovery path
Keep the existing root SSH session open while you edit, validate, reload, and test. Also verify that your VPS provider’s web console, serial console, rescue mode, or another out-of-band route is actually available to you. A syntax mistake, a wrong file, a firewall change, or a failed authentication test can otherwise leave you dependent on provider support.
A record of the current state
Before editing, note the Linux distribution and version, the SSH daemon package in use, and the current effective value of PermitRootLogin. Save a copy of the configuration files you will change. Recording the date and the eventual winning file makes later audits and incident recovery much easier.
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
Find the configuration sshd actually uses
OpenSSH normally reads /etc/ssh/sshd_config, unless the daemon was started with an alternate configuration file. Many distributions also enable drop-in files that are parsed with the main file. A setting in one of those files can override or otherwise determine the value you see in the primary file, so searching only the main file is insufficient.
- Inspect the main file and any enabled SSH server drop-ins used by your distribution.
- Search for every occurrence of
PermitRootLogin, including lines in included files. Commented lines beginning with#do not set a value, but multiple active lines deserve investigation. - Determine which file supplies the effective value rather than assuming the last file you opened is authoritative.
Do not edit a client-side file such as /etc/ssh/ssh_config; that controls outgoing SSH clients, not the server that accepts connections. The setting for incoming connections belongs to sshd and its server configuration.
Free tools Windows power users keep installed
One-click scans. No signup required.
Set the root-login policy
In the configuration file that should own the policy, add or change the active directive to:
PermitRootLogin no
Keep one clear, active value in the configuration hierarchy. If an enabled drop-in supplies another active value, remove the conflict or change the intended file so that the parsed result is unambiguous. Preserve normal SSH settings such as your allowed users, authentication methods, ports, and forwarding rules unless changing them is part of a separately tested hardening task.
Rank #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)
Understand the four PermitRootLogin values
The directive controls whether the root account can authenticate through SSH and, for some values, which authentication methods are permitted.
| Value | Can root authenticate through SSH? | Is root public-key login still possible? | Are root password and keyboard-interactive methods allowed? | Typical administrative meaning |
|---|---|---|---|---|
yes |
Yes | Yes | Yes, subject to other authentication settings | Direct root SSH administration is allowed. |
prohibit-password |
Yes, with non-password methods | Yes | No | Root password and keyboard-interactive authentication are blocked, but key-based root access remains. |
forced-commands-only |
Only in a restricted form | Only keys carrying a forced command | No | Useful for narrowly controlled automation, not ordinary interactive administration. |
no |
No | No | No | Root cannot log in through SSH at all. |
If your requirement is a complete ban on root SSH login, use no. Choosing prohibit-password merely removes password and keyboard-interactive methods; an attacker who obtains an authorized root private key can still authenticate.
Validate before reloading the daemon
Check syntax
Run the SSH daemon’s supported syntax check as an account with sufficient privileges. On OpenSSH installations this is commonly:
sudo sshd -t
A successful check normally produces no output and returns a zero status. Any error must be corrected before reloading. Do not treat a silent command as proof that the intended policy won; syntax validation only establishes that the file can be parsed.
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
Check the effective value
Ask sshd to print its effective configuration and inspect the resulting directive:
sudo sshd -T | grep -i '^permitrootlogin'
The result should show permitrootlogin no. If it shows another value, inspect active duplicate entries and enabled drop-ins, then repeat the check. If your daemon uses a non-default configuration file, supply that file with the option appropriate to your OpenSSH version rather than checking a different configuration than the running service uses.
Check the service’s own configuration path
Package units and provider images can start sshd with distribution-specific arguments. Confirm that the service you are about to reload points at the files you inspected. If the running service uses an alternate configuration, validate that exact file and its includes.
Reload, then test from a second terminal
- Reload the SSH server with the service manager and service name documented for your distribution. Ubuntu and Debian commonly expose the service as
ssh; Red Hat-family systems commonly usesshd. Verify the exact unit on your VPS instead of assuming one name. - Do not close the original root session. From a separate terminal or workstation, open a completely new SSH connection as the replacement administrator.
- Run
sudo -vand a harmless privileged check such assudo id -u. Confirm that the account has the expected administrative capability. - In another disposable test, attempt an SSH connection as root using the method you want to prohibit. The server should reject the login. A rejected root attempt confirms the policy; it does not indicate that your replacement account is broken.
- Review the SSH service log if the administrator connection fails. Correct the account, key permissions, firewall, or configuration while the original session remains available.
- Only after the new session and the root-rejection test succeed should you close the old root connection.
Use a new connection for the test rather than relying on an already authenticated shell. Existing sessions are not retroactively terminated by changing PermitRootLogin; they can remain open even while all new root logins are denied.
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.
How to avoid a lockout
The replacement account cannot connect
- Confirm that you used the correct username, host, port, and identity file.
- Check that the public key is in the replacement account’s authorized-keys file and that ownership and permissions satisfy your distribution’s SSH requirements.
- Verify that the account is not blocked by
AllowUsers,DenyUsers, group restrictions, an expired password, or an account shell that cannot start. - Use the still-open root session or provider console to inspect authentication logs and repair the account before changing root access again.
sudo fails after SSH succeeds
An SSH login proves only that authentication worked. Check group membership and the applicable sudoers rule with the provider’s documented method. Use visudo when editing sudo policy so syntax errors are caught. Do not remove the only working administrative path until a second account has successfully escalated privileges.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsThe effective value remains different from no
Search all active configuration files, including distribution drop-ins and files brought in by Include directives. Check for a cloud-image or configuration-management process that rewrites SSH policy. Re-run sshd -T against the same configuration used by the service. Editing an unused file cannot change the running policy.
The SSH service will not reload
Run the syntax check again and read the service manager’s error output. Typical causes include a misspelled directive, an invalid include path, a permissions problem, or an option unsupported by the installed OpenSSH version. Leave the existing session open, fix the reported issue, validate, and retry. If the daemon is stopped and cannot be restored remotely, use the verified provider console or rescue path.
You lost the existing SSH session
Use the out-of-band console or recovery environment you verified before the change. Restore a known-good configuration, validate it, and restart or reload the service according to the distribution’s documentation. This is why a second administrator connection and an independent console route should be tested before ending the original session.
Distribution and provider differences
The policy semantics are provided by OpenSSH, but operational details vary across Linux VPS images. The service unit may be named ssh or sshd; the enabled drop-in directory and include order can differ; cloud-init or another provisioning system may regenerate files; and console or rescue features are provider-specific. Treat the examples above as a procedure, not as a promise that every image uses identical paths or commands.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →After package upgrades, image changes, or cloud-init runs, re-check the effective value with sshd -T. A later drop-in or automated management policy can change the result even when the main file still appears unchanged.
Quick Recap
Final verification checklist
- A non-root individual account has a working SSH authentication method.
- That account has been tested with
sudoand can obtain the expected privileged identity. - The current root or console session remains open during the change.
- An out-of-band recovery route has been verified.
- The active policy is
PermitRootLogin noin the configuration that the running daemon parses. sshd -treports no syntax error.sshd -Treportspermitrootlogin no.- The SSH service has been reloaded with the correct distribution-specific service name.
- A fresh administrator connection succeeds.
- A fresh root SSH attempt is rejected.
- The final file, validation output, distribution/version, and change date are recorded.
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.




