Yes. Login as admin. Then go to the "service monitor" under "admin tools".Can I do that on the DA interface?
/usr/local/directadmin/data/admin/services.status
systemctl stop sshd
systemctl diable sshd
systemctl mask sshd
systemctl umask sshd
systemctl enable sshd.service
systemctl umask sshd
systemctl enable ssh.service
You can only use the file editor with the file I said,I see in the file editor there is an ssh config file as I read but I don't know how to turn it off?
systemctl stop sshd
systemctl disable sshd
You're missing something here. for RH and alike this would be sshd.service not ssh.service.systemctl enable ssh.service
sshd is linked to ssh.service. If you mask sshd you will need to enable the ssh.service to have the linked sshd service working again. So this is only if you mask the service and want to unmask itYou're missing something here. for RH and alike this would be sshd.service not ssh.service.
systemctl enable sshd.service
systemctl enable ssh.service
[root@deb023]systemctl cat sshd.service
# /lib/systemd/system/ssh.service
[Unit]
Description=OpenBSD Secure Shell server
Documentation=man:sshd(8) man:sshd_config(5)
After=network.target auditd.service
ConditionPathExists=!/etc/ssh/sshd_not_to_be_run
[Service]
EnvironmentFile=-/etc/default/ssh
ExecStartPre=/usr/sbin/sshd -t
ExecStart=/usr/sbin/sshd -D $SSHD_OPTS
ExecReload=/usr/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
RestartPreventExitStatus=255
Type=notify
RuntimeDirectory=sshd
RuntimeDirectoryMode=0755
[Install]
WantedBy=multi-user.target
Alias=sshd.service
You're welcome. I discovered that last year when I was running Debian on VPS as test and wanted to restart ssh and didn't work. Because I thought sshd was the daemon and ssh was the client. But in Debian I needed the ssh service.So I changed my answer yes Thanks
Login as root to your system via SSH and edit the file:
/usr/local/directadmin/data/admin/services.status
remove the line sshd=OFF and save the file.
A disabled service can be loaded, and will start if another service that depends on the service is started. So enable and disable only configure auto-start behaviour for units, and the state is easily overridden.Still don't understand that masking stuff.
That is why I wrote you can disable the service.
Because I'm not used to people repeating things I wrote when then agree with me. And it was unclear to me what you meant with "other stuff", because that could also well be the masking stuff. Which is indeed required for full disabling.Why do you think I am always disagreeing with you.
A disabled service can be loaded, and will start if another service that depends on the service is started. So enable and disable only configure auto-start behaviour for units, and the state is easily overridden.
A masked service (unit file is a symlink to /dev/null) makes it "impossible" to load the service, even if it is required by another, enabled service.
Because I'm not used to people repeating things I wrote when then agree with me. And it was unclear to me what you meant with "other stuff", because that could also well be the masking stuff. Which is indeed required for full disabling.
The reason I want to disable ssh is because when ssh is enabled in Brute Force Monitor there are a lot of bots that make my website get 502 error and run very slow.another option would be just to keep it running on port 22 (or another port) and then close port 22 (or another port) on the firewall If you need to get into the server just open the port
Are you sure that is caused by SSH? Because often bots are attacking the website itself, which can cause an overload.of bots that make my website get 502 error