SSH access disabled after enabled firewall - Ubuntu 20

Ahmad h 20 Reputation points
2024-03-23T13:00:21.9566667+00:00

Hello

I'm facing issue by mistake i enabled a UFW on Ubuntu 20, by mistake not add role to enable ssh access, and now i not have access to server, is there any way to fix this issue ?

Thanks

Azure VMware Solution
Azure VMware Solution
An Azure service that runs native VMware workloads on Azure.
311 questions
Azure
Azure
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
917 questions
0 comments No comments
{count} votes

Accepted answer
  1. Dan Rios 1,110 Reputation points MVP
    2024-03-23T13:08:01.6333333+00:00

    Hi Ahmad,

    No worries, let’s get that sorted and disabled for you!

    1. Log into the Azure Portal
    2. Go to your Ubuntu VM
    3. Under Operations you should see ‘RunShellScript’ option
    4. enter either ufw disable or ufw allow ssh and run the command
    5. verify you’re now able to get back in via SSH

    This should resolve your issue by either allowing SSH through ufw or disabling it so you can manually configure once back on the machine.

    If this was then please mark the answer as accepted so others can benefit in the community.

    thanks!


0 additional answers

Sort by: Most helpful