From the manual:
Control an active connection multiplexing master process. When
-O option is specified, the
ctl_cmd argument is interpreted
and passed to the master process. Valid commands are:
(check that the master process is running),
forwardings without command execution),
exit (request the master to exit), and
(request the master to stop accepting further multiplexing
Older versions only have
exit, but that's enough for your purpose.
ssh -O check host.example.com
If you want to delete all connections (not just the connection to a particular host) in one fell swoop, then
fuser /tmp/ssh_mux_* or
lsof /tmp/ssh_mux_* will list the ssh clients that are controlling each socket. Use
fuser -HUP -k tmp/ssh_mux_* to kill them all cleanly (using SIGHUP as the signal is best as it lets the clients properly remove their socket).