Skip to content

Commit

Permalink
added change the AMI port to 22 in the final steps
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosALgit committed Oct 16, 2024
1 parent 848f88c commit 796ca8c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ami/playbooks/build_ami_packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,19 @@
job: ". /etc/.changePasswords.sh"
special_time: reboot

- name: Change SSH port to 22
lineinfile:
path: /etc/ssh/sshd_config
regexp: '^Port 2200'
line: 'Port 22'
state: present

- name: Restart SSH service
systemd:
name: sshd
enabled: yes
state: restarted

###############################
# Cleaning stage
###############################
Expand Down

0 comments on commit 796ca8c

Please sign in to comment.