I wrote a chef cookbook and it runs fine with test-kitchen. Now I want to harden ssh access to the production nodes by writing a recipe that overwrites /etc/ssh/sshd_config. Among other things, it changes the ssh port to a non-default one.
When now running "kitchen login" after "kitchen converge", it fails, because it can't connect on the default port.
Is there a way to configure test-kitchen with a different ssh port? Or is there a different way to do this? Could I recognize whether the recipe is running in test-kitchen and only change the ssh port in production environments?