Is there a way to disable SSH completely?

SYSTEM INFORMATION
OS type and version Rocky 9.2
Virtualmin version 7.7

I have my server up and running, and currently facing the internet. While I’ve done my best to secure what accounts I can, I want to be extra sure and completely disable SSH, if possible - anything I need to do, I can do via the Web UI (unless I am misunderstanding, and disabling SSH will disable the Web UI console as well).

Is there a way to simply turn off the SSH feature, or at the very least, disable the service via the UI so it doesn’t restart if it’s shut down? I didn’t see SSH as a feature that could be enabled / disabled.

Thank you!

If you have physical access to the server I think it is safe to shut down the ssh server. I think that is over kill. It is helpful to listen on the local network. Change the port. If it is closed in the firewall then it is as good as disconnected from the internet.

Also, key only access is good. Bottom line, there are times my home machine hangs but I can still ssh in from the laptop.

disable access via firewalld might be best.
I add a cert key to mine and disable password login, stops any hacker.

else turn it off at boot

That works, thank you. I looked at FirewallD and removed the rule in the Public zone. Is there a way in the UI to view and manage the zones?

sure
image

Yes, but in that UI, I don’t see a way to edit or define what the different zones are. I see Public, Home, DMZ, etc… how do I define them?

Not sure, I’ve installed ConfigServer Security & Firewall and it uses Iptable, so my firewallD not longer runs. Maybe another users can help, might be best to create another topic for that.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.