Debian Tutorials

Debian Tutorials


Step by step tutorials showing you how to install and configure various applications and services on Debian based Linux distros.

December 2024
M T W T F S S
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Categories


Disable root login to SSH

Ástþór IPÁstþór IP

Allowing root logins to your SSH damon is a big security threat. If the SSH port is open, hackers will probably at some time attempt to brute force your root password. It’s a good idea to disable root logins to SSH and instead use a normal user to login and type “su -” to enter the super user shell or sudo to perform tasks that require root privileges.

1. Open the SSH daemon config file and change this line: (pico /etc/ssh/sshd_config)

PermitRootLogin no

2. Restart the SSH daemon

/etc/init.d/ssh restart

Comments 3
  • Norbert
    Posted on

    Norbert Norbert

    Author

    I prefer to permit only key authentication for root login:
    PermitRootLogin without-password


  • Marks
    Posted on

    Marks Marks

    Author

    Hi I just wanted to say thank you for some great tutorials =)


  • PAblo
    Posted on

    PAblo PAblo

    Author

    It doesnt work for me :S