Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Everyday people try to hack in with ssh.

    Scheduled Pinned Locked Moved Firewalling
    18 Posts 9 Posters 12.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      decibel83
      last edited by

      @novex:

      :D Thanks Guys. Pfsense forum is great. i will only open 22 while i need it via webgui by public ip. Is it safer?

      No, because if you cannot access to the web interface you will not be able to open the SSH port.
      Use a non default port for SSH, for example 8022!

      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by

        Non default ports do not add security.  Do not expose SSH, if you must, limit the IP addresses which can access it and use key based authentication instead of password based authentication.

        1 Reply Last reply Reply Quote 0
        • D
          danswartz
          last edited by

          Of course a non-standard port adds security.  How much is a debatable question, but I know from my own experience (and others) that we see far fewer attempts on non-standard ports than the standard port 22.

          1 Reply Last reply Reply Quote 0
          • Cry HavokC
            Cry Havok
            last edited by

            It adds obscurity, not security. That it stops the automated tools is certainly convenient though ;)

            1 Reply Last reply Reply Quote 0
            • D
              danswartz
              last edited by

              Well, now we're quibbling about the definition of security :)  I don't see this any different from having a harder to guess password - something everyone says "adds security".

              1 Reply Last reply Reply Quote 0
              • T
                tommyboy180
                last edited by

                I always use certificate based authentication on my ssh servers. I've never had to worry about a brute-force attack as a result.

                -Tom Schaefer
                SuperMicro 1U 2X Intel pro/1000 Dual Core Intel 2.2 Ghz - 2 Gig RAM

                Please support pfBlocker | File Browser | Strikeback

                1 Reply Last reply Reply Quote 0
                • ?
                  Guest
                  last edited by

                  @danswartz:

                  Of course a non-standard port adds security.  How much is a debatable question, but I know from my own experience (and others) that we see far fewer attempts on non-standard ports than the standard port 22.

                  You're talking about security theater instead of security.  Having SSH on a non-standard port doesn't protect against service scanning, it just limits the number of robot-scanners trying to guess bad passwords.  If you are running a vulnerable SSHd, or you have bad passwords in place, running SSH on a non-standard port isn't going to protect you.

                  1 Reply Last reply Reply Quote 0
                  • D
                    danswartz
                    last edited by

                    I think we have to agree to disagree here.  As far as weak passwords or exploitable sshd, nice strawman - I never said otherwise.  Again, if you have to try 20000 different ports * N different passwords, this is several orders of magnitude more difficult than hitting one well-known port.  By your logic, having a longer password with mixed case, etc, is just security theater?  If not, please explain more clearly why one is good and the other theater?

                    1 Reply Last reply Reply Quote 0
                    • Cry HavokC
                      Cry Havok
                      last edited by

                      In real world terms:

                      • Moving your SSH port is like moving where the lock on the door is - it'll stop dumb automated attacks but nothing more

                      • Picking a strong password is like picking a strong lock - it makes it harder for every attacker

                      That's not to say that there isn't a slight gain from moving the port (I do it myself to cut down the noise in my logs), but it isn't really security in any meaningful sense.

                      1 Reply Last reply Reply Quote 0
                      • D
                        danswartz
                        last edited by

                        Well, all I can say is if it only really helps against dumb automated scanners, that is the great preponderance of threats to ssh (I say this not just from personal experience, but from a wide range of people I've talked to, who monitor any attempts to hack their systems.)

                        1 Reply Last reply Reply Quote 0
                        • ?
                          Guest
                          last edited by

                          Which is the point of our argument.  Automated scanners trying to guess obvious passwords are already defeated either by using good password security, ACLs or key based authentication.  Changing the default port adds no additional security.

                          1 Reply Last reply Reply Quote 0
                          • D
                            danswartz
                            last edited by

                            Okay, I see your point.  I was looking at it from the PoV of someone's home network trying to figure out how to reduce threats, but yeah, you have a point.

                            1 Reply Last reply Reply Quote 0
                            • jimpJ
                              jimp Rebel Alliance Developer Netgate
                              last edited by

                              Changing to an alternate port does help cut down on log spam though, and if your logs are more relevant it's easier to spot a potential security issue or targeted breach when you don't have to sort through a bazillion automated attacks.

                              Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                              Need help fast? Netgate Global Support!

                              Do not Chat/PM for help!

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post
                              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.