kitchen-docker icon indicating copy to clipboard operation
kitchen-docker copied to clipboard

Allow SSH on non-standard ports

Open tapasmishra opened this issue 8 years ago • 3 comments

Seems the driver is hardcoded to start the SSHd service on port 22, but it's really very useful to allow SSH on non-standard ports so we can test various automation scripts those have different requirements. It will take a little amount of effort to update.

tapasmishra avatar Sep 13 '17 03:09 tapasmishra

What scripts do you mean?

coderanger avatar Sep 13 '17 03:09 coderanger

Sorry for the late response. Currently I am developing a Inspec Profile for compliance. My requirement is , to test the SSH daemon is available on a Linux machine but not via the default port (22):

describe port(22) do
  its('processes') { should_not include 'sshd' }
end

Here the compliance test fails. So, if I will able to specify the port then I think it will help a lot.

tapasmishra avatar Sep 15 '17 06:09 tapasmishra

Testing anything involving sshd is unfortunately out of scope for kitchen-docker just as a side effect of how it works. Any tests would be a false positive. This could be improved in the future, but it doesn't seem likely given the limitation of distro packages (i.e. it isn't just the port that collides, it's all the config files too).

coderanger avatar Sep 15 '17 06:09 coderanger