Host * ControlMaster auto ControlPath ~/.ssh/control/%r@%h:%p # Use ServerAlive instead of TCPKeepAlive for improved stability ServerAliveCountMax 3 ServerAliveInterval 20 TCPKeepAlive no