Sharing in case this can help you in the future, this is what works for me with Termux in .ssh/config
ServerAliveInterval 120
ServerAliveCountMax 30
TCPKeepAlive yes ServerAliveInterval 120
ServerAliveCountMax 30
TCPKeepAlive yesNo comments yet.