Removing connected servers from sidebar

Finder menu > Prefs or Cmd ⌘ ,

Locations > Connected servers - uncheck.
Unchecking Bonjour computers will prevent them showing when not connected.