Wednesday, July 10, 2013

Fixing broken SSH session

Over the last two years, I experienced an annoying issue with SSH  when I worked from my notebook with remote AWS EC2 instances. If I left SSH session without activity for about 5 minutes than the session has been frozen and halted. So I had either pressing a key each minute to keep the session alive or terminating the halted  and start another one.

Luckily, today I found a solution. SSH client has an option "ServerAliveInterval" that can solve the problem. After I had added the line  ServerAliveInterval 60 to /etc/ssh/ssh_config I found my SSH sessions are kept alive for a long time even though there wasn't any activity from the both sides.



No comments:

Post a Comment