In Macos, Item2 do not have a builtin ssh keepalive configuration, to config ssh keepalive, setup ssh config for current user or global confguration, add blow configuration for current user
vi ~/.ssh/config
Host *
ServerAliveInterval 20
ServerAliveCountMax 180
TCPKeepAlive no