diff --git a/Linux_reinstall/RedHat/CloudInit/ipv4_static_interfaces.cfg b/Linux_reinstall/RedHat/CloudInit/ipv4_static_interfaces.cfg index f6426f1..ae81825 100644 --- a/Linux_reinstall/RedHat/CloudInit/ipv4_static_interfaces.cfg +++ b/Linux_reinstall/RedHat/CloudInit/ipv4_static_interfaces.cfg @@ -44,7 +44,7 @@ network: addresses: [ipDNS1, ipDNS2] # later commands -# Replace ssh port, permit root user login by password, enable sshd service. +# Enable sshd service. # Stop and disable kdump service. # Set hostname. # Allocate 512MB swap to provent yum dead. @@ -54,9 +54,6 @@ network: # Update grub2. # Delete cloud-init config file itself and disable it permanently after first execution. runcmd: - - sed -ri 's/^#?Port.*/Port sshPORT/g' /etc/ssh/sshd_config - - sed -ri 's/^#?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config - - sed -ri 's/^#?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config - systemctl enable sshd - ssh-keygen -A - systemctl restart sshd