First off, there are two config files of interest here:
/etc/ssh_config - configuration file for the ssh
client
/etc/sshd_config - configuration file for the ssh
server
If you make a change to sshd_config then the change will apply to all connections made
to this server. Making changes to ssh_config affect outgoing connections initiated by this machine.
So the first question is which file to edit.
If you want to control this at the server side (so idle connections are terminated by the server) then edit /etc/sshd_config.
All the options are covered in the sshd_config man page:
# man sshd_config
Specifically, I think you're looking for a combination of
ClientAliveInterval and
ClientAliveCountMax.
ClientAliveInterval sets how frequently SSHD checks the client connection. If
ClientAliveCountMax tests are performed without any response the connection is closed.
So, for your 15 minute disconnect you could set the ClientAliveInterval to 300 (5 minutes = 300 seconds), with a ClientAliveCountMax set to 3 (you don't want to set it to 15 minutes/1 Max since any temporary network delay could cause the connection to drop).
To control this from the client side, the corresponding parameters to add to /etc/ssh_config are
ServerAliveInterval and
ServerAliveCountMax.
How do you restart sshd after making changes to the config?
Changes are dynamic, and applied to each new connection (i.e. the next time you log in it will use the current ssh
config/sshdconfig settings).