Your SSH sessions to a remote server drop after a few minutes idle through a corporate firewall. How do you fix it?
BeginnerScenarioNetworking, SSH and remote access
Answer
Situation read → A stateful firewall times out idle connections.
What I'd do →
Client side ~/.ssh/config:
Host *
ServerAliveInterval 60
ServerAliveCountMax 3
Or server side: ClientAliveInterval 60.
Why → Keepalive packets keep the connection entry alive in the firewall's state table.
Interview tip → Use tmux or mosh for flaky links so your work survives drops.
More on Networking, SSH and remote access
A key belonging to a departed engineer may be in `authorized_keys` on 300 servers. How do you rotate SSH keys across the fleet?IntermediateYou need to reach a database on a private subnet from your laptop through a bastion. How?BeginnerYour security team wants SSH hardened on all servers. What changes do you make?BeginnerA new server needs a static IP, gateway and DNS on RHEL 9. How do you configure it persistently?BeginnerYou're changing the network config of a remote server over SSH and could lose access. How do you protect yourself?IntermediateA web server should accept HTTP/HTTPS from anywhere but SSH only from the office. Configure the firewall.Beginner