CentOS 7 - Disable Root Login
#!/bin/bash SEARCH="#PermitRootLogin yes" REPLACE="PermitRootLogin no" FILEPATH="/etc/ssh/sshd_config" sudo sed -i "s;$SEARCH;$REPLACE;" $FILEPATH sudo service sshd restart
sshd
to ssh
Last updated: 29th July 2021
First published: 16th August 2018
First published: 16th August 2018