Repository navigation
AWS rds #2238
|
Our Ubuntu server currently accepts SSH connections on the default port 22. Some team members suggest moving SSH to a non-default port to reduce automated login attempts. Does changing the SSH port meaningfully improve security, and what precautions should we take before modifying it? |
Replies: 1 comment
|
Changing the SSH port can reduce noise from automated scans, but it should not be treated as a primary security control. I'd prioritize stronger protections first:
If changing the port is justified, I'd update the SSH server configuration, validate it before reloading, and ensure that the new port is allowed through every relevant firewall and network security rule. I'd keep an existing administrative session open and test a second connection before closing it. This reduces the risk of accidentally locking out administrators. For example, after configuring SSH to listen on port 2222, a Windows connection test would be: Test-NetConnection <SERVER_IP> -Port 2222 The change is useful as a minor noise-reduction measure, but authentication, access control, and monitoring provide the real security benefits. |
Changing the SSH port can reduce noise from automated scans, but it should not be treated as a primary security control.
I'd prioritize stronger protections first:
If changing the port is justified, I'd update the SSH server configuration, validate it before reloading, and ensure that the new port is allowed through every relevant firewall and network security rule.
I'd keep an existing administrative session open and test a second connection before closing …