Port 22 will not open even it iss configured as open inUFW

Discussion in 'Installation/Configuration' started by muekno, Feb 6, 2023.

  1. muekno

    muekno Active Member HowtoForge Supporter

    I installed my server debian 11 with the auto script and --harden-ssh option, now port 22 will not open even it is configured in UFW settings

    What to do?
    Thanks for help
    Rainer
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Maybe you configured sshd to listen on a different port? Have you checked with:

    netstat -ntap | grep ssh

    where it listens to? Besides that, the ssh config for the hardened options is not in /etc/ssh/sshd_config but in an include file (it's in the folder /etc/ssh/sshd_config.d or similar name).
     
  3. muekno

    muekno Active Member HowtoForge Supporter

    Thanks for quick reply, It is a brand new setup following your minimal server and perfect server tutorials. the auto script was start via an ssh connection on port 22
    i will look for the sshd_config.d folder
     
  4. muekno

    muekno Active Member HowtoForge Supporter

    Solved, renamed the conf in sshd_config.d folder and restartet sshd
    Port open again
    Thanks
    Rainer
     
  5. muekno

    muekno Active Member HowtoForge Supporter

    ports opens after restarting sshd but closes again when attempting to connect
    restatring opens again try connect closes again.
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    ahrasis and muekno like this.
  7. muekno

    muekno Active Member HowtoForge Supporter

    Thank you that worked
     

Share This Page