I'm using macbook and annoyed by ssh timeout everyday.
When my internet connection is down(by moving to conference room) or most of the times that macbook goes to sleep mode, ssh connections show timeout message
Timeout, server ~~~~ not responding. after 10~15 seconds, and any key input including Ctrl+zxcd all does nothing before timeout.
How can I change this, so instead of waiting 15 seconds to re-open ssh or relaunching terminal to open another ssh connection that I can get timeout message & get disconnected after 3 seconds?
Here's my ~/.ssh/config file... yeah I've tried ServerAliveInterval but it didn't work.
Host git-codecommit.*.amazonaws.com User ABCDEFGHICJKLMNOPQRST IdentityFile ~/.ssh/id_rsa Host * ServerAliveInterval 3 ConnectTimeout 3 ConnectionAttempts 1
Also my /etc/ssh/ssh_config is modified that it contains only comments.
bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory.)
To reproduce this, ssh any remote host and then turn Wifi off.