Yes, if you want to allow root login via SSH, you should remove the `#` in front of `PermitRootLogin` in your SSH configuration file. The `#` symbol denotes a comment, so removing it will enable the setting. However, please note that this is usually not recommended, having the root user open can lead to security issues, since an attacker would already know your user. If you have any more questions or need assistance, feel free to ask!
@ no what I mean is that you say “permitrootlogin should be set to no”, but you do not mention that the # should be removed after setting this to no. In other words: if you let the # stay in front of the PermitRootLogin, then why does it matter to set it to “no”? @hostingeracademy
Got it! Thank you for the explanation, you’re absolutely correct! In a configuration file, if there’s a # at the beginning of a line (e.g., #PermitRootLogin), it means that line is commented out and not active. Changing the setting to "no" will only work if you remove the # at the beginning of the line. I've forwarded your feedback to our team 😉 By the way - if the PermitRootLogin line is commented out in the file, the default setting depends on the SSH version and distribution. However, in most recent versions of OpenSSH, the default is set to "prohibit-password", which allows root login only with SSH keys, not with passwords. This setting is a middle ground for security, though it’s generally not as restrictive as setting it explicitly to no.
@@HostingerAcademy My experience is that VPS providers have enabled root login, so you must remove the # if you want to disable it, after editing the line to "no"
Hi there! If you’ve changed the SSH port and can no longer log in, it's important to ensure that the new port is properly configured. You may not need port forwarding unless you are behind a specific network setup, but you should check that the firewall allows traffic through the new port.
Hey there! Depending on your VPS template and OS you might need to take different or additional steps to secure your VPS. However, templates can provide a good starting point, but securing your VPS with additional steps ensures better protection against potential vulnerabilities.
@@HostingerAcademy VPS template is almalinux with plesk. It would be nice to share how to secure your vps while using a template to avoid any issues with the server for those who don't have solid server knowledge.
Hey there, We're really sorry to hear about the issues you're facing. We want to make sure you have the best hosting experience possible. To help us resolve this quickly, could you please provide more details about the problem via our help form at hstn.gr/HelpForm? Thank you for your cooperation! 🙏
Enhance your VPS security with Hostinger’s VPS features 👉 bit.ly/3wpHudP
💥 Use the discount code VPS10 to get 10% OFF!
Shouldn't you remove the # in front of PermitRootLogin?
Yes, if you want to allow root login via SSH, you should remove the `#` in front of `PermitRootLogin` in your SSH configuration file. The `#` symbol denotes a comment, so removing it will enable the setting. However, please note that this is usually not recommended, having the root user open can lead to security issues, since an attacker would already know your user. If you have any more questions or need assistance, feel free to ask!
@ no what I mean is that you say “permitrootlogin should be set to no”, but you do not mention that the # should be removed after setting this to no. In other words: if you let the # stay in front of the PermitRootLogin, then why does it matter to set it to “no”? @hostingeracademy
Got it! Thank you for the explanation, you’re absolutely correct! In a configuration file, if there’s a # at the beginning of a line (e.g., #PermitRootLogin), it means that line is commented out and not active. Changing the setting to "no" will only work if you remove the # at the beginning of the line. I've forwarded your feedback to our team 😉
By the way - if the PermitRootLogin line is commented out in the file, the default setting depends on the SSH version and distribution. However, in most recent versions of OpenSSH, the default is set to "prohibit-password", which allows root login only with SSH keys, not with passwords. This setting is a middle ground for security, though it’s generally not as restrictive as setting it explicitly to no.
@@HostingerAcademy My experience is that VPS providers have enabled root login, so you must remove the # if you want to disable it, after editing the line to "no"
after changing port, ssh can no longer login. do i need to do any port forwarding?
Hi there!
If you’ve changed the SSH port and can no longer log in, it's important to ensure that the new port is properly configured. You may not need port forwarding unless you are behind a specific network setup, but you should check that the firewall allows traffic through the new port.
should we apply this even if we get a vps with a template ?
Hey there!
Depending on your VPS template and OS you might need to take different or additional steps to secure your VPS. However, templates can provide a good starting point, but securing your VPS with additional steps ensures better protection against potential vulnerabilities.
@@HostingerAcademy VPS template is almalinux with plesk. It would be nice to share how to secure your vps while using a template to avoid any issues with the server for those who don't have solid server knowledge.
where is command line, that shown in this tutorial?
You can find it by opening your computer's terminal/CMD, and logging in to your VPS using SSH conenction😊
Bad hosting, because server connectivity problem continue in search console
Hey there,
We're really sorry to hear about the issues you're facing. We want to make sure you have the best hosting experience possible. To help us resolve this quickly, could you please provide more details about the problem via our help form at hstn.gr/HelpForm? Thank you for your cooperation! 🙏