this post was submitted on 10 Feb 2025
829 points (99.4% liked)

linuxmemes

22425 readers
1222 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. ๐Ÿ‡ฌ๐Ÿ‡ง Language/ัะทั‹ะบ/Sprache
  • This is primarily an English-speaking community. ๐Ÿ‡ฌ๐Ÿ‡ง๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ‡บ๐Ÿ‡ธ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • ย 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
     

    Background: 15 years of experience in software and apparently spoiled because it was already set up correctly.

    Been practicing doing my own servers, published a test site and 24 hours later, root was compromised.

    Rolled back to the backup before I made it public and now I have a security checklist.

    (page 2) 50 comments
    sorted by: hot top controversial new old
    [โ€“] dadabean@feddit.org 52 points 2 days ago (48 children)

    Interesting. Do you know how it got compromised?

    load more comments (48 replies)
    load more comments (1 replies)
    [โ€“] MonkderVierte@lemmy.ml 4 points 1 day ago

    Yeah, about this; any ssh server that can be run as user and doesn't do shenanigans like switching user?

    [โ€“] ramius345@sh.itjust.works 26 points 2 days ago* (last edited 2 days ago) (5 children)

    You should turn off ssh password logins on external facing servers at a minimum. Only use ssh keys, install fail2ban, disable ssh root logins, and make sure you have a firewall limiting ports to ssh and https.

    This will catch most scripted login attempts.

    If you want something more advanced, look into https://en.m.wikipedia.org/wiki/Security_Technical_Implementation_Guide and try to find an ansible playbook to apply them.

    load more comments (5 replies)
    [โ€“] ptz@dubvee.org 25 points 2 days ago* (last edited 2 days ago) (4 children)

    And this is why every time a developer asks me for shell access to any of the deployment servers, I flat out deny the request.

    Good on you for learning from your mistakes, but a perfect example for why I only let sysadmins into the systems.

    load more comments (4 replies)
    [โ€“] possiblylinux127@lemmy.zip 8 points 2 days ago (3 children)

    I like to spin up a public facing server and run tcpdump

    load more comments (3 replies)
    [โ€“] DavidGA@lemmy.world 15 points 2 days ago (3 children)

    Although disabling the root user is a good part of security, leaving it enabled should not alone cause you to get compromised. If it did, you were either running a very old version of OpenSSH with a known flaw, or, your chosen root password was very simple.

    load more comments (3 replies)

    Use gnome powder to shrink, go behind the counter, kick his ass and get your money back.

    [โ€“] otacon239@lemmy.world 11 points 2 days ago (1 children)

    Iโ€™ve always felt that if youโ€™re exposing an SSH or any kind of management port to the internet, you can avoid a lot of issues with a VPN. Iโ€™ve always setup a VPN. It prevents having to open up very much at all and then you can open configured web portal ports and the occasional front end protocol where needed.

    load more comments (1 replies)
    load more comments
    view more: โ€น prev next โ€บ