Skip to content

Someone put port 22 on 0.0.0.0/0 in a security group

This is how instances get scanned within an hour and compromised within a week. Closing it is today's work, a clean SSH path takes a day.

Try this first

  1. 1Close the rule now: replace 0.0.0.0/0 with your office IP, or better, remove the rule altogether.
  2. 2For SSH to private instances use AWS Systems Manager Session Manager, Azure Bastion or GCP IAP. No public SSH needed.
  3. 3Turn on AWS Config, Defender for Cloud or Security Command Center with a rule that flags port 22 or 3389 on 0.0.0.0/0 as non-compliant.
  4. 4Review every existing security group and NSG. CloudTrail or Activity Log shows who added the rule, usually worth tracking down.
  5. 5Write into an SCP or Azure Policy that public SSH/RDP rules are denied, not just flagged.

When to bring us in

If the instance has been open for weeks and has access to production data, treat it as an incident and bring in someone who does forensics.

See also

None of the above fits?

Describe your situation below. We pass your input plus the steps you already saw to our AI and return tailored next-step advice. If it's too risky to DIY, we'll say so.

Who are you?

For the AI question we need your email and company, so we can follow up if the AI gets stuck, and to prevent abuse.

Limited to 2 questions per hour and 5 per day, kept lean so the AI stays useful. For more, contacting us directly works better for you and us.

Or skip the DIY entirely

Our Managed IT clients do not look these things up. One point of contact, a fixed monthly price, resolved within working hours.