You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 26, 2020. It is now read-only.
Is your feature request related to a problem? Please describe.
If I want to change the default sshd port from 22 to 12345, the server's ansible_port should be set to 12345so that Ansible can keep connecting to the server after the change. But, since when I run ssh-hardening for the first time the port is still 22, ssh-hardening will not be able to connect. So I am forced to edit the inventory after the first run.
Describe the solution you'd like
The ssh-hardening rule could try to connect to both port 22 and the desired final port 12345. Just like this article suggests.
This way the inventory could be configured with the final port 12345 and ssh-hardening would be idempotent, work both in the first and subsequent runs.
Describe alternatives you've considered
Add a custom role that runs before ssh-hardening implementing the solution proposed in the article linked above.