Disable ‘Connect to server’ menu option in OS X Finder

Disable the menu option: ‘Go ▸ Connect to server…’ (cmd⌘ + K) in the Mac OS X Finder menubar.

defaults write com.apple.finder ProhibitConnectTo -bool true

To make the command take effect, you need to restart the Finder.

killall Finder

Revert to the default setting:

defaults write com.apple.finder ProhibitConnectTo -bool false