mirror of
https://github.com/leitbogioro/Tools.git
synced 2025-11-10 01:10:30 +08:00
Update ipv4_static_interfaces.cfg
This commit is contained in:
parent
ddcf4e93e6
commit
cc8bd228de
1 changed files with 1 additions and 4 deletions
|
|
@ -44,7 +44,7 @@ network:
|
||||||
addresses: [ipDNS1, ipDNS2]
|
addresses: [ipDNS1, ipDNS2]
|
||||||
|
|
||||||
# later commands
|
# later commands
|
||||||
# Replace ssh port, permit root user login by password, enable sshd service.
|
# Enable sshd service.
|
||||||
# Stop and disable kdump service.
|
# Stop and disable kdump service.
|
||||||
# Set hostname.
|
# Set hostname.
|
||||||
# Allocate 512MB swap to provent yum dead.
|
# Allocate 512MB swap to provent yum dead.
|
||||||
|
|
@ -54,9 +54,6 @@ network:
|
||||||
# Update grub2.
|
# Update grub2.
|
||||||
# Delete cloud-init config file itself and disable it permanently after first execution.
|
# Delete cloud-init config file itself and disable it permanently after first execution.
|
||||||
runcmd:
|
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
|
- systemctl enable sshd
|
||||||
- ssh-keygen -A
|
- ssh-keygen -A
|
||||||
- systemctl restart sshd
|
- systemctl restart sshd
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue