Changing SSH Port

Discussions center on whether moving SSH from the default port 22 reduces automated brute-force attacks, log noise, and low-effort bots, with consensus that it helps despite not providing real security against targeted threats.

📉 Falling 0.4x Security
2,016
Comments
20
Years Active
5
Top Authors
#5078
Topic ID

Activity Over Time

2007
3
2008
7
2009
25
2010
73
2011
84
2012
60
2013
261
2014
90
2015
66
2016
154
2017
71
2018
65
2019
68
2020
401
2021
81
2022
122
2023
74
2024
233
2025
68
2026
10

Keywords

e.g IMO VPC AWS SSH EIP MAY WireGuard robot.txt wikipedia.org port ssh knocking 22 brute fail2ban changing attacks security brute force

Sample Comments

supbpeerr Jun 16, 2016 View on HN

From experience, running ssh on non-default port have mostly reduced automated login attempts to 0, year after year.

keeperofdakeys Sep 30, 2015 View on HN

While it doesn't give any real security, changing the ssh port will at least filter out these kinds of attacks.

moe Oct 8, 2012 View on HN

You're making no sense. Moving the SSH port is a trivial way to reduce your attack surface (undirected bulk scans go for 22).

DethNinja Mar 13, 2022 View on HN

Change the default ssh port. Most of the attacks are from automated crawlers that try to brute force port 22. Your logs will become much more manageable.

nerdponx Jan 28, 2024 View on HN

I set my SSH port to something with a high number that is not used by any other known service. Drive-by attacks dropped to 0.

dx034 Feb 18, 2022 View on HN

Is changing SSH port really necessary? If your SSH is vulnerable, attackers will find the Port for it.

acheron Aug 15, 2013 View on HN

Moving SSH to a different port does nothing if your system is being specifically targeted, but it stops 99% of drive-by bots. Not that they do much anyway but it at least stops them from showing up in your logs.

Havoc Jan 24, 2019 View on HN

Also...stick the SSH on a non-default port. Cuts login attempts down to near zero.

_ltzq Jul 11, 2021 View on HN

Just changing my SSH port to 900 has reduced the amount of brute force by a fraction.

treerunner Jun 15, 2016 View on HN

I always change the ssh port to something other than 22. It has always seemed to work well for me for most automated attacks. Perhaps this is not advisable for some reason?