Ubuntu – Configure ssh on Ubuntu 16.04 recovery mode

sshUbuntuufw

So I have a dedicated server. My host was able to get me to recovery mode. I am able to log in using ssh. Here's my dilemma.
I accidentally changed ssh ports while logged in and forgot to add a rule to allow ufw incoming connections. Therefore I am locked out.
Now, I am in recovery mode in Ubuntu through ssh. It uses a zsh shell it appears.

How do I make a rule in ufw from recovery mode to allow connections on that incoming port? If it is not possible, how do I disable ufw altogether and re enable it later?

Thanks.

Best Answer

You can change the value in /etc/ufw/ufw.conf

from Enabled=yes to no. Then do a restart