I have a Mac Mini that has an open port to the Internet. This machine was also my internal media server. But over time, I notice that the performance of the Mac was dropping. One of the CPU threads was always running at 100%. Eventually after some investigation, I found the problem. This Mac had port 22 open through the router for external access. Well, port 22 is frequently probed for weaknesses including weak passwords and vulnerabilities. These frequent probes affect the SSH daemon and will affect the CPU and memory of the system.
Want to improve your external facing system’s performance, either change the default SSH port from 22 to another non-standard (>1024) port or have port forwarding setup to direct a non-standard external port to your internal SSH port.
The moment I did this, the probes stopped and CPU utilization dropped to near 0. This tip will work for hosted virtual machines and cloud instances that have SSH open to the world.