800-862-5965 sales@macminivault.com -

One of our customers recently linked us to their blog where they have nice collection of OS X Server related articles. Some of the articles sparked a few ideas and we put together a nice little script that will quickly (within seconds) change the port that SSH listens on.

Enabling remote SSH access on a Mac is simplistic and easy. Under the sharing preferences there is a ‘Remote Login’ option that requires a single click to be activated. This allows for some powerful remote access via the command line. SFTP file transfers and remotely diagnosing a distressed Mac with non-functioning VNC/ARD access are two prime examples for enabling Remote Login.

If this machine is live on the internet and port 22 is not being filtered by a firewall then you may run into some unwanted attention. Bots and scanners crawl the web looking for responses on port 22. The majority of the time this results in no harm, as they have to randomly guess login credentials. For the peace of mind and a little added security, running SSH on a non-standard port is just a good idea. Running the script is as simple reading the README file, then copying and pasting this bash line into terminal:

bash <(curl -Ls http://git.io/_9fF7g)

This script is a part of our Mac-Scripts project on GitHub.
Check out codedmemes.com for some more OS X Server tweaks and tips.