FTP – Blocked Port 22 but Still Have Root Access to FTP

ftpsshufw

recently I messed up hard and blocked port 22 with ufw, but I still have root access with sftp. I tried editing /etc/ufw/ufw.conf and set ENABLED=no but even after reboot I still cant connect. Any suggestion ? I also know that port 25566 is opened, can I maybe somehow change ssh to that port ?

Also with putty i get this:

Error

Update: I logged into ssh with port 2226(sftp port) and disabled ufw.
I still cant login with port 22

Looks like problem is not in ufw, also looks like no service is running on port 22, any suggestion?
Screenshot

Best Answer

I missedited sshd_config, after I added this to the config, problem was solved:

  1. Port 22
  2. AddressFamily any
  3. ListenAddress 0.0.0.0
  4. ListenAddress ::