I had my server set up to accept SSH connections on port 21966, I followed some steps to configure ufw however it has now locked me out of all SSH access on any port!
I've been able to boot my server into 'rescue' mode, providing me with an SSH rescue account, through which I am able to mount the hard drives and see my files. I do not know what to do from here, as the ufww service isn't running so I cannot disable it or uninstall.
Best Answer
Your ufw rules should be located in
/lib/ufw/user.rules
config file. Modify that file so that somewhere between### RULES ###
and### END RULES ###
section there are the following entries:Additionally make sure that your
/etc/ssh/sshd_config
file hasPort 21966
entry(instead of port 22).