i want to remotely ssh to my home server, and I was wondering if I could just forward port 22 with disabling password login and use pubkey authentication will be safe enough?

  • brandontaylor1@alien.topB
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    As long as password auth is disabled you’re fine. No one is cracking your RSA key. You can add Fail2Ban to reduce the log noise, but security wise it’s fine.

      • SR_Lut3t1um@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Dont connect it to the internet too. Chances are even less likely that some navy seals kinda guys will steal you data with brute force. Also always keep explosives next to your hdds so once they do come you can explode them.

    • Hatta00@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Change your port.

      No one’s cracking a proper implementation of RSA, but not every implementation is proper. A little obscurity can’t hurt.

      • pentesticals@alien.topB
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Just waiting for everyone to come in saying you shouldn’t do this lol. Yes, changing the port is a nice little bonus. It doesn’t any extra security, but it moves you out of the way from the automated bots that scan the internet trying recent 0days. You’ll probably see a reduction of 99% traffic hitting the service and the only logs will be real people.

        • Oujii@alien.topB
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 year ago

          only logs will be real people.

          There are bots that scan for open ports in minutes.

          • pentesticals@alien.topB
            link
            fedilink
            English
            arrow-up
            1
            ·
            1 year ago

            Yes but most bots are scanning for common ports. It’s far too slow to scan 65k ports on every host. Even things like shodan only scan a handful of common ports. But you can test this yourself, expose SSH on a port number in 20-40ks, I’ve seen several weeks without a single probe.

            If you’ve ever done mass scanning you know that’s minutes is not going to to be a full scan and if you are trying to do 65k ports in a few minutes, your results will not be accurate.

            • dal8moc@alien.topB
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              Which is easily defeated by using one block of ip addresses to gather data and another block for actually trying to exploit found ports. Unless you block the whole AS. If the attacker only uses one system with one ip they probably wouldn’t have the resources to get past ssh anyway.

              • Karyo_Ten@alien.topB
                link
                fedilink
                English
                arrow-up
                1
                ·
                1 year ago

                Behavior blocking can be done across many IPs.

                If you have one IP that scans port 10000, the other port 10001, and thousands of other IPs scanning just 1 port it’s still blatantly obvious.

                And if they want to scan in a less obvious manner they need to do this spaced by days.

    • mshriver2@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      If you really want security you should also add UFW and restrict it to only your IP address.

    • DarthNihilus@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Realistically no one is cracking my super long randomized password either. Seems fine to leave it on as backup login.