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
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).
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
ports opens after restarting sshd but closes again when attempting to connect restatring opens again try connect closes again.
Try to delete the file in /etc/ssh/sshd_config.d folder. If you also configured munin and monit, check their logs. It might be that sshd gets restarted automatically when it is not reachable on the port it should listen to. See also: https://git.ispconfig.org/ispconfig/ispconfig-autoinstaller/-/issues/91