Why am I seeing so many login attempts on my Raspberry Pi?

April 25, 2025 5 answers
Asked by lino.block
I'm running a website on my Raspberry Pi using nginx, and I keep noticing that my SSH terminal freezes frequently. After looking through my logs, I found tons of UFW blocks and messages about invalid user disconnectionsโ€”it's happening multiple times per second! Is this something I should be worried about? I don't have much traffic on my site, could these login attempts be causing the lag in my terminal, or is that a separate issue? I'd really appreciate any insights on how to handle this.

Answers

pumice dust
If you're exposing services directly to the internet, that's a common risk. For your web server, just forward ports 80 and 443 and secure your configurations. If SSH is absolutely necessary, go with a non-standard port and definitely use fail2ban to safeguard against brute force attempts.

sleeve+placket: Totally! I've been using fail2ban, and it really helpsโ€”the fewer attempts you see over time.

Reply to this answer
all-in-one-pot
These login attempts are pretty standard when you expose SSH to the internet. Just to be safe, make sure you've disabled root logins, and configure your SSH to only allow key-based authentication. This makes it much harder for bots to gain access!

42 red stitches: And always remember to generate and manage your SSH keys carefully. Itโ€™s easy to lock yourself out if youโ€™re not careful.

Reply to this answer
access-control-list
It sounds like you might be dealing with a brute force attack. Exposing port 22 to the internet is risky. Consider installing fail2ban and switching to a different SSH port. These bots are constantly scanning and trying to guess passwords, so taking those precautions can help a lot!

gel+lane8: I've switched to a different SSH port and added fail2ban already. It really did reduce the attempts significantlyโ€”now I see only a few a minute!

!check the seals: Also, make sure you limit SSH access to known IPs if you can. That can help cut down on unwanted access attempts.

Reply to this answer
..several.options
I recommend not exposing your Raspberry Pi directly. Instead, consider using cloud servicesโ€”they offer better security and backup support. Just leaving it out there can invite all sorts of unwanted traffic.
Reply to this answer
7 scenes rehearsed
Definitely install fail2ban and change your SSH port. Running SSH on a non-standard port can help avoid most bots. Also, you might want to tweak iptables or UFW rules to block malicious requests completely. Just donโ€™t accidentally lock yourself out!

ALMOST CERTAIN: Exactly! And even if you use a different port, make sure you're aware that determined attackers will still scan for it.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions