Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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

SSH failures become much easier to fix once you classify the exact error. A timeout usually means the connection attempt received no response; “connection refused” means the host answered but no SSH service accepted the connection; “Permission denied (publickey)” points to authentication; and a connection that closes after login usually indicates a shell, account, or resource problem.

Work from the outside in: confirm the destination and port, test both firewall layers, verify that sshd is listening, repair authentication, then investigate the login shell and system resources. If a firewall or configuration change has locked you out, use your VPS provider’s web or recovery console rather than making blind changes.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

1. Record the exact SSH error before changing anything

Do not start by reinstalling packages or changing several settings at once. Copy the complete command and error text, including the hostname, address, port, and whether the failure happened before or after authentication. The wording identifies which layer to inspect first.

Error or symptom What it usually means First place to investigate
Connection timed out The client sent a connection attempt, but no response arrived before the timeout. Destination address, provider firewall, VPS firewall, routing, or a blocked local network.
Connection refused The host was reachable, but nothing accepted the connection on that port, or a firewall actively rejected it. SSH port, listening service, and firewall rules.
Permission denied (publickey) The server was reached, but the offered key or account authentication was not accepted. Username, private key selection, authorized_keys, ownership, and SSH authentication settings.
Connection closed or Connection reset The TCP connection opened and was then terminated, often by a crashed or misconfigured SSH service, account policy, or resource exhaustion. Server logs, sshd configuration, account shell, and system capacity.
Unable to negotiate The client and server could not agree on a host-key, key-exchange, cipher, or related protocol algorithm. Client and server SSH versions, host keys, and supported algorithms.

DigitalOcean’s documented examples include ssh: connect to host 203.0.113.0 port 22: Connection timed out, ssh: connect to host 203.0.113.0 port 22: Connection refused, and Unable to negotiate with 203.0.113.0: no matching key exchange method found. These are vendor documentation examples, not independent measurements.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • 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.

2. Confirm the VPS address, username, and SSH port

A surprising number of outages are attempts to reach an old address, the wrong VPS, or a port that was changed during hardening. Verify the current public IPv4 or IPv6 address in the provider panel and confirm the login account created on that machine.

Check the name resolution

If you use a hostname, resolve it from the same computer that runs SSH:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
getent hosts example-vps.example

Compare the returned address with the VPS panel. A stale DNS record can send you to a decommissioned server or a different machine. If the hostname has both IPv4 and IPv6 records, test each address deliberately; an unusable IPv6 route can make a client appear to hang even when IPv4 works.

Use the configured port explicitly

Port 22 is the default, not a guarantee. The effective setting may be in /etc/ssh/sshd_config or an included file under a directory such as /etc/ssh/sshd_config.d/. Try the documented port directly:

ssh -p 2222 username@203.0.113.0

On a server console, search the configuration for every active Port directive and for Include statements. A later included file can override an earlier line. Do not assume that changing the client command changes the server; both sides must agree.

Check whether the local network blocks the port

Corporate, school, hotel, and public Wi-Fi networks sometimes block outbound SSH. Test from a permitted network or a trusted mobile hotspot. If the same VPS and port work elsewhere, the server may be healthy and the local network is the constraint.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Test reachability without attempting a full login

A port test separates network and service failures from key or account failures. From Linux or macOS, use a TCP check against the actual port:

nc -vz 203.0.113.0 22

A successful TCP connection does not prove authentication will work, but it shows that traffic can reach something on that port. A timeout indicates that packets or replies are being filtered or routed incorrectly. A refusal indicates that the address is reachable but no permitted service is accepting the port.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • 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

You can also ask SSH for progressively more detail:

ssh -v -p 22 username@203.0.113.0
ssh -vvv -p 22 username@203.0.113.0

Verbose output shows the resolved address, connection attempt, host-key exchange, offered identities, and the point at which the session fails. Treat it as client-side evidence; a timeout still requires server-side inspection through a console because the server has not supplied logs over SSH.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

4. Check both firewall layers

Most VPS platforms have a provider-controlled firewall or security group outside the virtual machine, and the operating system may have its own firewall inside the VPS. Opening only one layer is insufficient. Permit the actual SSH port from the intended source address, preferably restricted to your administration network rather than the entire internet.

Provider firewall or security group

In the hosting control panel, inspect inbound rules for the VPS’s public IP, protocol, and port. Confirm that TCP is selected and that the rule applies to this specific server or network interface. If you recently changed the SSH port, update the provider rule before restarting the service. Also check outbound rules if the platform lets you restrict them; an unusual egress policy can interfere with replies or package-based recovery.

Ubuntu and other systems using UFW

Use the recovery console or an existing administrative session:

sudo ufw status verbose
sudo ufw allow 22/tcp
sudo ufw reload

Replace 22 with the configured port. If you want to limit access, use a source address or subnet rather than a global allow rule. Confirm the rule appears as enabled before closing your current session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Systems using firewalld

sudo firewall-cmd --state
sudo firewall-cmd --list-services
sudo firewall-cmd --list-ports

If SSH is not listed, allow the service or the custom port, then make the change persistent according to your distribution’s policy. For a custom port, the firewall rule and sshd configuration must match exactly.

Systems using iptables

sudo iptables -nL --line-numbers

Look for an established-connection rule and an inbound rule permitting TCP on the SSH port. A rule that drops traffic earlier in the chain wins, so read the table from top to bottom. Distribution-specific persistence mechanisms determine whether a temporary rule survives reboot; make a backup of the current rules before editing them.

Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【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.

5. Verify that sshd is running and listening

Once you have console access, check the service name used by the distribution. It is commonly ssh on Ubuntu and sshd on other systems, but the unit name can vary.

sudo systemctl status ssh
sudo systemctl status sshd

If the service is stopped, inspect why before starting it. Validate syntax first:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo sshd -t

No output normally means the configuration passed the syntax check. An error identifies the file and line that must be corrected. Do not restart a service after editing an unvalidated configuration; you can turn a recoverable session into a lockout.

Confirm the listening socket and address:

sudo ss -ltnp | grep -E ':(22|2222)b'

Use your real port in place of the examples. A listener bound only to 127.0.0.1 is reachable locally but not through the public interface. A listener on IPv6 only will not accept an IPv4 connection, and the reverse is also true.

Read service logs

sudo journalctl -u ssh --since "30 minutes ago"
sudo journalctl -u sshd --since "30 minutes ago"

Look for binding failures, malformed directives, missing host keys, permission errors, and repeated crashes. If the service starts and immediately exits, the journal usually contains more actionable information than the client’s generic “connection refused” message.

6. Fix “Permission denied (publickey)” methodically

Authentication failures occur after the network path and SSH listener have done their jobs. Work through the identity chain instead of repeatedly generating keys.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Confirm the account and key offered by the client

The username is part of the SSH destination. A key installed for admin will not authenticate as root or another account. Run verbose mode and note which identities are offered. To force a particular private key:

ssh -i ~/.ssh/vps_ed25519 -o IdentitiesOnly=yes username@203.0.113.0

If an agent is loaded with many keys, the server may reject attempts before the correct key is tried. IdentitiesOnly=yes limits this connection to the key you specify. Check your local SSH client configuration for a host-specific IdentityFile that points somewhere unexpected.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【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.

Verify the server-side public key

Through the console, inspect the target account’s file:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo cat /home/username/.ssh/authorized_keys

The public key must be one matching the private key you are using. A line wrapped across multiple lines, altered characters, or a key copied into the wrong account will fail. Keep each key on one line and remove only entries you have positively identified as obsolete.

Repair ownership and permissions

OpenSSH commonly rejects keys when the directory or file is writable by other users. For the account named username:

sudo chown -R username:username /home/username/.ssh
sudo chmod 700 /home/username/.ssh
sudo chmod 600 /home/username/.ssh/authorized_keys

Also check the home directory ownership and mode. A root-owned home directory or an inaccessible parent directory can prevent the SSH daemon from reading the key. If the account uses a nonstandard home path, use the path recorded in /etc/passwd rather than assuming /home/username.

Check enabled authentication settings

Review effective settings for directives such as PubkeyAuthentication, AuthorizedKeysFile, AllowUsers, AllowGroups, and any Match blocks. A restrictive rule can apply only to one account or source address. Validate the configuration with sshd -t, keep the console session open, and test a second SSH session before disconnecting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

7. Resolve host-key and protocol negotiation errors

“Unable to negotiate” can mean that the client and server have no algorithm in common, while a host-key error can mean that the server’s host keys are missing or the client has a stale record for that address.

Check server host keys

Inspect the SSH configuration for HostKey directives and verify that the referenced files exist and are readable by the daemon. A damaged image, incomplete package installation, or incorrect file permissions can leave sshd unable to start or negotiate.

Handle a changed host key safely

If the VPS was rebuilt and now presents a different host key, do not blindly disable host-key checking. Confirm the rebuild or address change through your provider’s console, then remove only the old entry for that host from the client’s known_hosts file. Reconnect and verify the new fingerprint through a trusted administrative channel.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【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.

Prefer upgrades over weakening cryptography

Compare the client and server SSH versions and supported algorithms. Upgrade an obsolete client or server when possible. Enabling deprecated key-exchange or cipher algorithms may restore access temporarily but reduces security; if you must use a compatibility option for an emergency, scope it to one host in the client configuration and remove it after upgrading.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

8. When SSH authenticates and then immediately closes

A successful key exchange followed by an instant disconnect shifts the investigation to the account and shell phase.

Check the login shell

Inspect the account entry:

getent passwd username

The final field should be a valid interactive shell such as /bin/bash or another shell installed on the VPS. /usr/sbin/nologin and /bin/false intentionally terminate interactive sessions. Change the shell only when the account is supposed to provide interactive access, and use the path that exists on that distribution.

Check the home directory

Confirm that the home directory exists, is mounted, and is accessible to the account. A missing directory, incorrect ownership, or a full filesystem can allow authentication but prevent the shell from starting. Check:

df -h
df -i
ls -ld /home/username

Check memory and process limits

Severe memory pressure, exhausted process limits, or too many open files can terminate a session as it starts. Review kernel and service logs, then inspect available memory and limits from the console. Stop or reconfigure the process consuming the resource before repeatedly retrying SSH. Rebooting may clear a temporary condition, but it does not fix a persistent memory leak, runaway job, or undersized VPS.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

9. Recover safely through the provider console

The web console, serial console, or rescue environment is the correct path when SSH itself is unavailable. The exact label differs by provider, but the recovery sequence is similar.

  1. Open the VPS console and log in with an administrative account or the provider’s documented recovery credentials.
  2. Record the current configuration and firewall rules before editing them. Copy /etc/ssh/sshd_config and any included files to a dated backup location.
  3. Run sshd -t and correct the specific syntax, path, or permission error it reports.
  4. Restore a known-good firewall rule for the real SSH port and your trusted source address.
  5. Start or restart the SSH service only after validation, then check systemctl status and the journal.
  6. Open a second SSH session and verify login, key authentication, and the expected shell before closing the console.
  7. Remove temporary broad firewall rules and emergency compatibility settings once access is confirmed.

If the filesystem or network stack is irreversibly damaged, repeated blind edits can destroy evidence or worsen data loss. Prioritize a provider snapshot or backup, data extraction, and a controlled redeployment. Treat redeployment as a recovery decision, not as a substitute for identifying which data and configuration must be preserved.

10. A compact decision path

  • Timeout: verify address and port, test from another network, then inspect provider and VPS firewalls.
  • Refused: confirm the port, check that ssh/sshd is listening, validate configuration, and read service logs.
  • Permission denied: confirm username and private key, inspect verbose output, repair authorized_keys ownership and permissions, and review account restrictions.
  • Negotiation or host-key error: verify host keys and algorithm compatibility; upgrade rather than permanently enabling obsolete cryptography.
  • Connects then closes: inspect the login shell, home directory, disk and inode space, memory, process limits, and open-file capacity.
  • Locked out after a change: use the recovery console, back up configuration, validate with sshd -t, restore the intended firewall rule, and test a second session.

11. Prevent the next lockout

  • Keep a documented emergency console path and test it before you need it.
  • Maintain at least one separate administrative access method while changing SSH or firewall settings.
  • Change one variable at a time and preserve a rollback copy of every configuration file.
  • Test a new SSH port and authentication policy in a second session before ending the current one.
  • Restrict SSH sources where practical, but ensure your recovery network remains permitted.
  • Monitor disk space, inodes, memory, processes, and open files; resource exhaustion can look like an SSH failure.
  • Keep backups or snapshots that support recovery when configuration or filesystem damage is beyond repair.

12. What to look for in a VPS service

If console recovery is a deciding factor when selecting a VPS, compare practical operational capabilities rather than marketing labels:

Capability Why it matters during an SSH outage
Web, serial, or rescue console Lets you inspect and repair the server when network SSH is unavailable.
Clear firewall and port controls Makes it possible to distinguish provider-level filtering from the VPS firewall.
SSH troubleshooting documentation Provides distribution-specific service names, log locations, and recovery procedures.
Accessible logs Supplies evidence for failed starts, binding errors, authentication failures, and crashes.
Snapshots, backups, and redeploy options Offers a controlled fallback when configuration or filesystem damage cannot be repaired safely.
Support escalation for managed servers Provides another route when you cannot reach the console or the machine has suffered deeper infrastructure failure.

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.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.