How to disable the Finder's 'Connect to Server' option

Here’s another great little snippet to add to my ‘how to disable’ series!
The OS X Finder’s ‘Connect to Server’ menubar option allows a user to specify a network address to connect to for services such as file sharing and VNC.
If you decide that you don’t want users to be able to access the OS X Finder’s ‘Connect to Server’ menubar option as shown below, this can easily be disabled.
how to disable finders connect to server
To remove the ‘Connect to Server’ option, all you need to do is log in as an admin user and enter one line of command in the Terminal application (located in /Applications/Utilities/) as shown below:

defaults write ProhibitConnectTo -bool true;killall Finder

Notice the ‘Connect to Server’ option is now missing and also the hot keys of ‘CMD’ + ‘K’ do not work either:
defaults writes finder server
If you do want to revert back to the default setting, just enter the following command:

defaults write ProhibitConnectTo -bool false;killall Finder

While the author has taken care to provide our readers with accurate information, please use your discretion before acting upon information based on the blog post. Amsys will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.
This feature has been tested using OS X v10.8.4 which was the latest Mac OS release at the time of writing.