LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   SSH to the server with root account (https://www.linuxquestions.org/questions/debian-26/ssh-to-the-server-with-root-account-4175733619/)

Jason.nix 02-07-2024 05:55 AM

SSH to the server with root account
 
Hello,
By default, Debian has blocked the use of SSH with the root account. When I look at the /etc/ssh/sshd_config file, then the PermitRootLogin option is not enabled! So how is it not possible to connect via SSH with root account?

Thank you.

Guttorm 02-07-2024 06:15 AM

Hi

It's the line:

#PermitRootLogin prohibit-password

It's commented out, so it means it's just the default. Root can use ssh with ssh key - just not with password. You can change it to:

PermitRootLogin yes

But if the computer is facing the internet, you'll get lots of attacks. At least install fail2ban or something.

pan64 02-07-2024 06:23 AM

And actually do not use ssh with root if not necessary. And do not use it with password, but an ssh key (if really needed).
By the way, it is not impossible, it is just disabled for security reasons. For your own safety.


All times are GMT -5. The time now is 12:52 AM.