updated notes and powertools command. updated ssh root allow sed command

This commit is contained in:
crp3844
2022-11-18 11:16:53 -05:00
parent b2e35f348c
commit f065518862

View File

@@ -64,7 +64,7 @@ if [ ${OS} == "Debian" ] || [ ${OS} == "Ubuntu" ]; then
apt autoremove -y
# modify ssh to allow root login and then restart the service
sed --in-place "s/^.PermitRootLogin\ prohibit-password/PermitRootLogin\ yes/" /etc/ssh/sshd_config
sed --in-place "s/^.PermitRootLogin.*/PermitRootLogin\ yes/" /etc/ssh/sshd_config
systemctl restart sshd
# GauntDC01-CA
@@ -108,7 +108,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then
systemctl start uptimed
systemctl enable uptimed
fi
# Centos 7
# Centos 8/Rocky 9.0
if [ "${OS_VERSION}" == "8" ] || [ "${OS_VERSION}" == "9.0" ]; then
# upgrade all packages
dnf update -y
@@ -117,7 +117,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then
dnf install -y elrepo-release epel-release yum-utils
# enable powertools
dnf config-manager --set-enabled PowerTools
dnf config-manager --enable crb
# clean the yum cache
dnf clean all
@@ -142,7 +142,7 @@ elif [ "${OS}" == "CentOS" ] || [ "${OS}" == "Rocky" ]; then
fi
# modify ssh to allow root login and then restart the service
sed --in-place "s/^#PermitRootLogin\ yes/PermitRootLogin\ yes/" /etc/ssh/sshd_config
sed --in-place "s/^.PermitRootLogin.*/PermitRootLogin\ yes/" /etc/ssh/sshd_config
systemctl restart sshd
# GauntDC01-CA