Software⏱️ 2 min read📅 2026-06-03

How to Fix: Way to avoid ssh connection timeout & freezing of GNOME Terminal

Prevent SSH connection timeouts and GNOME Terminal freezing with the 'set -e' command.

Quick Answer: Use the 'set -e' command in your shell configuration to prevent SSH connections from timing out.

When you connect via SSH to certain servers, it timeouts and “freezes” the terminal (doesn't accept input, doesn't disconnect, can't Ctrl-C to kill the SSH process or anything).

⚠️ Common Causes

  • Poor network connectivity.

✅ Best Solutions to Fix It

Method 1: Enable SSH KeepAlive

  1. Step 1: Open a terminal as the current user.

Method 2: Use SSH Config File

  1. Step 1: Create a new file in ~/.ssh/config.

🎯 Final Words

To regain terminal input/output from SSH connections that have timed out, enable SSH KeepAlive or use the SSH Config File method.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions