diff --git a/defaults/main.yml b/defaults/main.yml index 629037b..5e0f1ac 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,5 +1,6 @@ --- sshd_protocol: 2 +sshd_port: 22 sshd_permit_root_login: "yes" sshd_permit_empty_passwords: "no" sshd_password_authentication: "no" diff --git a/templates/etc/ssh/sshd_config.j2 b/templates/etc/ssh/sshd_config.j2 index 5a2ffa1..515d5fd 100644 --- a/templates/etc/ssh/sshd_config.j2 +++ b/templates/etc/ssh/sshd_config.j2 @@ -15,7 +15,7 @@ # SELinux about this change. # semanage port -a -t ssh_port_t -p tcp #PORTNUMBER # -#Port 22 +Port {{ sshd_port }} #AddressFamily any #ListenAddress 0.0.0.0 #ListenAddress ::