Allow/Disallow Root SSH Login

From KlavoWiki
Jump to navigationJump to search

Edit Config File

vi /etc/ssh/sshd_config

Allow

To allow root login from SSH add the line

PermitRootLogin Yes

Disallow

To disallow root login remove the above line or change it to

PermitRootLogin No

or

PermitRootLogin without-password

Restart daemon

Then restart the SSH daemon

systemctl restart ssh