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.

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

If an SSH terminal becomes unresponsive only after you stop typing, the most likely cause is not the shell itself: a NAT gateway, firewall, VPN, or other packet-filtering device has discarded the idle TCP connection. The terminal remains open locally, but packets can no longer reach the other endpoint. OpenSSH describes this as a packet filter or NAT device timing out a connection because of inactivity.

Start by classifying when the failure occurs. Then use SSH-level keepalives to keep idle connections visible and to disconnect cleanly when a route really is dead. Keepalives can detect and bound a failure; they cannot repair a broken Wi-Fi link, an overloaded host, a stalled kernel, or a VPN that has stopped forwarding traffic.

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

First identify what “freezing” means

Different timing patterns point to different causes. Record the exact symptom before changing settings.

It freezes only after a period of inactivity

This pattern strongly suggests an idle timeout in a NAT gateway, firewall, VPN concentrator, or packet filter. The timeout may be only a few minutes, and it can be shorter than the lifetime you expected for the SSH session. Pressing a key appears to do nothing because the connection’s path has already been discarded.

#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: 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.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

It freezes while you are actively typing

Active-session failures are less consistent with an idle middlebox timeout. Investigate Wi-Fi loss, VPN interruptions, packet loss, a changing route, an MTU problem, endpoint resource pressure, or a remote shell and host kernel that have stopped responding.

It stalls during a file transfer or other continuous traffic

A transfer that stops while data is moving can indicate packet loss, congestion, a broken VPN tunnel, an MTU or fragmentation problem, storage pressure, or a process that has exhausted CPU or memory. Keepalives are not a substitute for testing those conditions.

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

It hangs immediately at login

Capture verbose output to determine whether the pause occurs during network connection, authentication, channel setup, or shell startup. Authentication delays can involve an identity provider, DNS, a token or smart-card helper, or a server-side account hook rather than an idle TCP timeout.

How SSH keepalives prevent silent hangs

OpenSSH has two SSH-protocol keepalive mechanisms. The client sends an encrypted “server alive” request with ServerAliveInterval. The server can send an encrypted “client alive” request with ClientAliveInterval. A response confirms that the encrypted SSH connection is still responsive. Because these messages travel inside the SSH protocol, they are not merely unauthenticated TCP probes and cannot be spoofed by an intermediary that cannot participate in the SSH session.

Each mechanism has a count setting. ServerAliveCountMax limits unanswered client probes; ClientAliveCountMax does the same for server probes. The count bounds how long OpenSSH waits before it closes a connection that no longer responds. A keepalive does not make a dead route work again: it either keeps an idle path active or tells you, after a defined period, that the path is unavailable.

Client-side fix: ServerAliveInterval and ServerAliveCountMax

Use the client settings when you control the computer from which you run ssh. In the OpenSSH client manual, ServerAliveInterval defaults to 0, which means no SSH-level probes are sent by default. Debian’s documented behavior can differ in some BatchMode situations, so check the manual for the client build you actually run.

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.
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

Test a setting for one connection

Try a temporary configuration before editing any files:

ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=3 user@host

This sends a probe every 30 seconds when the client has not received traffic from the server. With a count of 3, the client gives up after three unanswered probes. The exact elapsed time is approximately 90 seconds for this example, plus network and processing delays; the count is not a promise of a precise wall-clock cutoff.

Choose an interval shorter than the suspected NAT, firewall, or VPN idle timer. There is no universal “correct” value: a 30-second interval is only a test example. If the middlebox expires connections after five minutes, an interval comfortably below five minutes is appropriate. If you do not know the timeout, begin conservatively, observe whether the freeze disappears, and avoid creating needless traffic with an extremely short interval.

Make the client setting persistent

Put a host-specific entry in your per-user SSH configuration file, normally ~/.ssh/config:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Host example
    ServerAliveInterval 30
    ServerAliveCountMax 3

Replace example with the host alias or pattern you use in your SSH command. A host-specific block limits the behavior to that destination. You can use a broader pattern only when you intentionally want the same policy for several hosts. Protect the file according to your operating system’s normal SSH configuration and permission practices.

What the client defaults mean

Option Documented default Effect
ServerAliveInterval 0 No SSH-level client probes are sent unless you enable them.
ServerAliveCountMax 3 At most three unanswered server-alive probes are tolerated before the client disconnects.

With ServerAliveInterval 15 and the default count of 3, the documented behavior is a disconnect after approximately 45 seconds without a response. That figure is approximate because scheduling, transport delays, and when OpenSSH sends the first probe affect the elapsed time.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【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.

Server-side fix: ClientAliveInterval and ClientAliveCountMax

Use the server settings when you administer the SSH server and want sshd to check whether clients remain responsive. Edit the server’s sshd_config through your operating system’s documented administration process:

ClientAliveInterval 15
ClientAliveCountMax 3

With these values, the server sends an encrypted client-alive request at the interval and disconnects after three unanswered requests. The OpenSSH server manual documents a default ClientAliveCountMax of 3; with an interval of 15 seconds, an unresponsive client is normally disconnected after approximately 45 seconds.

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

After changing the file, validate the configuration with the SSH daemon’s platform-supported test mode before reloading or restarting the service. Then use the service manager documented for that operating system to reload or restart sshd. A reload is preferable when supported because it normally lets existing sessions continue while new connections use the updated configuration. Keep an existing administrative session open until you have confirmed that a new login works; a syntax error or an incorrect access rule can otherwise lock you out.

When to use server settings

  • Use ClientAliveInterval when the server must detect clients that have vanished, gone to sleep, or lost their network path.
  • Use a client setting when an individual user needs to survive an idle middlebox and you cannot or should not change the server.
  • Deploy both only when their independent policies are intentional. They monitor opposite directions and can have different intervals and failure bounds.

TCPKeepAlive is not the same thing

TCPKeepAlive enables operating-system TCP keepalive behavior. The documented OpenSSH configurations enable it by default, but it operates at the TCP transport layer rather than as an authenticated message inside the encrypted SSH protocol.

Mechanism Configured on Detection layer Best use Limit
ServerAliveInterval and ServerAliveCountMax SSH client, usually ~/.ssh/config Encrypted SSH protocol Keep an idle path active and bound client-side failure Cannot repair a failed route, VPN, endpoint, or server
ClientAliveInterval and ClientAliveCountMax SSH server, sshd_config Encrypted SSH protocol Let the server detect and close unresponsive clients Requires server administration and a safe reload
TCPKeepAlive SSH client and server configuration TCP transport Detect a dead route or crashed host through TCP keepalives Does not provide the same SSH-level control over an encrypted session

For a session that becomes silent after inactivity, SSH-level alive messages are usually the more direct control because they generate traffic in the SSH channel and let OpenSSH count unanswered protocol requests. Leave TCP keepalives enabled unless you have a specific, tested reason to change them.

A step-by-step troubleshooting workflow

1. Capture verbose connection output

Open a new terminal and connect with:

ssh -vvv user@host

Save or copy the output around the failure. Look for whether packets stop during authentication, channel creation, or an already-established idle session. The distinction prevents you from applying an idle keepalive fix to a login problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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.

2. Reproduce the idle failure with a temporary probe

Run:

ssh -o ServerAliveInterval=30 -o ServerAliveCountMax=3 user@host

Leave the session idle for longer than the period that normally causes the freeze. If it stays usable, the original failure was probably an idle timeout in the path. Keep the interval below the suspected intermediary timeout rather than assuming that 30 seconds is universally required.

3. Persist only the policy you need

Add the tested values to the appropriate Host block in ~/.ssh/config. If the same client reaches several networks with different policies, use separate host patterns or aliases instead of forcing one aggressive interval on every destination.

4. Configure the server when you control it

Set ClientAliveInterval and ClientAliveCountMax in sshd_config, validate the file with the daemon’s test mode, and reload or restart through the operating system’s supported service tooling. Test a fresh login while your original administrative connection remains available.

5. Correlate both ends at the failure time

Compare client verbose output with server authentication and daemon logs. Also inspect:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • VPN and firewall logs for tunnel resets or policy timeouts;
  • NAT idle timers and state-table events;
  • packet loss, route changes, and Wi-Fi roaming or sleep;
  • MTU or fragmentation symptoms, especially across VPNs;
  • CPU, memory, disk, and process pressure on the remote host;
  • whether the remote shell, terminal multiplexer, or host kernel is stalled.

6. Preserve the exact disconnect text

Do not paraphrase an error as merely “SSH froze.” Record whether the client reports a broken pipe, connection reset, timeout, or another message. Match that text and timestamp with verbose SSH output and system logs. A broken pipe or reset indicates that the connection ended; a terminal that still accepts local keystrokes but produces no remote output may instead be waiting on a dead path or a stalled remote process.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Fixes matched to common symptoms

Idle-only freezes through a home or office network

Start with a client-side ServerAliveInterval shorter than the network device’s idle timeout. If you manage the firewall or NAT gateway, inspect and, where policy permits, increase its TCP idle lifetime. Keepalive traffic consumes a small amount of bandwidth but may conflict with a security policy that intentionally removes idle state.

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.

Idle freezes only when a VPN is connected

Test the same SSH destination with and without the VPN when policy allows. Review the VPN client’s sleep behavior, tunnel rekey or timeout logs, and the VPN gateway’s idle handling. An SSH keepalive can keep the tunnel’s relevant flow active, but it cannot restore a VPN tunnel that has already been torn down.

Failures while typing or transferring data

Do not rely on longer keepalive counts as the primary fix. Test another network, check packet loss and route changes, verify MTU behavior across the VPN, and inspect endpoint resource usage. If the remote machine is out of memory or its kernel is stalled, SSH probes will also go unanswered.

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

Immediate login hangs

Use ssh -vvv from a fresh connection and identify the last completed phase. Check name resolution, authentication helpers, account startup scripts, authorization services, and server logs. A keepalive interval cannot solve a prompt or service that never completes during login.

Choosing intervals and failure bounds

There are two separate decisions: how often to send a probe and how many unanswered probes to tolerate. A shorter interval notices failure sooner and is more likely to keep a stateful middlebox alive, but it creates more control traffic and can expose a busy or sleeping endpoint sooner. A larger count tolerates transient packet loss but leaves a dead terminal appearing open for longer.

  • Measure or estimate the shortest idle timeout in the path and choose an interval below it.
  • Use a count that matches how quickly users need stale sessions removed.
  • For unreliable links, avoid a count of one; one lost packet would terminate an otherwise usable session.
  • For administrative systems where stale access is confusing or risky, a shorter bounded failure window may be preferable.

Do not interpret an alive response as proof that every application running inside the session is healthy. It confirms SSH protocol responsiveness at that moment, not the progress of a compiler, database client, transfer process, or shell command.

What keepalives cannot fix

  • A suspended laptop whose network stack is not running.
  • A Wi-Fi association that has dropped or is repeatedly roaming.
  • A VPN tunnel or firewall rule that is blocking all traffic.
  • A route that has changed to an unreachable path.
  • An MTU or fragmentation problem that prevents packets from traversing the path.
  • A remote host under CPU, memory, storage, or kernel pressure.
  • A shell or application that is blocked even though the SSH transport is healthy.

When probes fail, treat the event as evidence of an unresponsive path or endpoint and continue with logs and network tests. Increasing ServerAliveCountMax or ClientAliveCountMax only postpones the disconnect; it does not restore service.

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

Operational and security considerations

Keepalives reveal that a connection is still in use to devices that can observe traffic metadata, even though the messages themselves are encrypted. Follow organizational rules for persistent sessions and VPN use. On shared systems, avoid changing a global server policy solely to accommodate one user’s network; a host-specific client setting may be safer.

Always retain an alternative administrative path while editing sshd_config. Validate before reloading, confirm that a new connection succeeds, and record the chosen interval and count so operators understand why a session disconnects after a bounded period.

Bottom line

For a terminal that freezes after predictable inactivity, enable client-side ServerAliveInterval and set an appropriate ServerAliveCountMax; make it persistent in ~/.ssh/config after testing. If you administer the server, use ClientAliveInterval and ClientAliveCountMax to give sshd its own failure policy. Keep TCPKeepAlive conceptually separate, and investigate VPN, firewall, Wi-Fi, MTU, route, resource, and login causes whenever the failure is not idle-specific.

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.