I'm trying to ssh to a remote server. But after the ssh is successful the **connection freezes within 2-3 minutes and eventually drops**.
On checking packet trace i observed my mac is randomly sending a **RST packet** to the remote server that is causing the connection to close.
If this isn't already strange enough, i found that this happens if **open a file in vim** after establishing the ssh connection but if i ssh and leave the terminal as it is then the connection doesn't freeze.
How can i debug this issue? How can i find why my mac is doing so?
I tried to restart the ssh service on macbook but it didn't solve the issue
If i do **hard reboot** of Mac then the issue is fixed
PS: I have the following parameters in my ssh_config file
Host *
ServerAliveInterval 60
ServerAliveCountMax 30
This issue started after there was a network issue and all my ssh connections were abruptly dropped. After that when i'm trying to ssh i observer this behaviour
Asked by Abhinav Goyal
(1 rep)
Jul 8, 2025, 02:06 PM