Skip to content

Commit

Permalink
Updated host ssh keys & machine-id regeneration to be universal acros…
Browse files Browse the repository at this point in the history
…s different Linux distros
  • Loading branch information
AllRWeak authored and at3rva committed Oct 9, 2023
1 parent 7425529 commit eb86183
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ if [[ -z $(grep -r {{ hostname }} /etc/ssh/) ]]; then
# Reming existing SSH host keys
rm /etc/ssh/ssh_host_* -v

# Regenerate SSH host keys and machine-id on first boot
# Regenerate SSH host keys and machine-id
ssh-keygen -A
dbus-uuidgen --ensure=/etc/machine-id
rm /etc/machine-id
systemd-machine-id-setup

# Restarting SSH service
systemctl restart ssh* # * Is to match sshd and ssh
Expand Down

0 comments on commit eb86183

Please sign in to comment.