0

I set up fwknop to a server (managed by ansible). I have set up .ssh/config to automate port knocking. When I run (ansible) scripts, they will connect to the server multiple times, increasing execute speed significantly.

How can I achive that fwknop is not invoked just when it is needed?

I can automate it with a small wrapper script which checks the availability of the host and knoks when necessary but I cannot believe there is no standard switch somewhere for this scenario.

.ssh/config excerpt:

Match host my.remote.host exec "fwknop -v -n %h"
3
  • 1
    Port knocking is extremely rare. Most of us just secure our systems instead. Anyway you'll probably need to share the specifics of how you configured ssh and how you configured ansible to use ssh. Nov 5, 2020 at 21:42
  • The ansible part is irrelevant. The point is that the script makes ssh connections multiple times. And knocking is time consuming.
    – pihentagy
    Nov 6, 2020 at 11:00
  • It sounds that you have a definite list, which needs to be done before fwknop. Could you give me a list of those taks?
    – pihentagy
    Nov 6, 2020 at 15:32

0

You must log in to answer this question.

Browse other questions tagged .