From 21e1ff6b9cf82dd850287c2ea7501e5413578454 Mon Sep 17 00:00:00 2001 From: maxbachmann Date: Sun, 14 Apr 2019 15:01:00 +0200 Subject: [PATCH] allow different ssh port than 22 --- defaults/main.yml | 3 +++ templates/sshd_config.j2 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/defaults/main.yml b/defaults/main.yml index 70a71ff..9a0c3cb 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,4 +1,7 @@ --- +# set the ssh port +ssh_port: 22 + # default users for SSH access sshd_default_allowed_users: - "root" diff --git a/templates/sshd_config.j2 b/templates/sshd_config.j2 index cbe236a..87fe8ca 100644 --- a/templates/sshd_config.j2 +++ b/templates/sshd_config.j2 @@ -3,7 +3,7 @@ # Networking -Port 22 +Port {{ ssh_port }} TCPKeepAlive yes