Is your feature request related to a problem? Please describe.
I have changed the ports attribute in order to avoid attackers to find it to easily but this cookbook change both the server and client config.
This makes any commands, depending on ssh, to use the server port as client so that a git ls-remote command fails because of the client Port config which isn't 22 anymore.
Describe the solution you'd like
In order to avoid a breaking change, the default['ssh-hardening']['ssh']['ports'] Array should allow integers and Hashes, so that both should work, with the Hash one allowing to tell a port for the sever, and a port for the client like that:
default['ssh-hardening']['ssh']['ports'] = [
{ server: 12345, client: 54321 }
]
or to tell only the sever or the client port:
default['ssh-hardening']['ssh']['ports'] = [
{ server: 12345 }
]
Implementing this is easy and gives flexibility to the operator to configure SSH.
Describe alternatives you've considered
A workaround is to create a file ~/.ssh/config containing Port 22.
Additional context
In my case, I'm deploying a Rails app with Capistrano which first tries the git ls-remote git@gitlab.com:group/project.git and it fails.
Is your feature request related to a problem? Please describe.
I have changed the
portsattribute in order to avoid attackers to find it to easily but this cookbook change both the server and client config.This makes any commands, depending on ssh, to use the server port as client so that a
git ls-remotecommand fails because of the clientPortconfig which isn't 22 anymore.Describe the solution you'd like
In order to avoid a breaking change, the
default['ssh-hardening']['ssh']['ports']Array should allow integers and Hashes, so that both should work, with the Hash one allowing to tell a port for the sever, and a port for the client like that:or to tell only the sever or the client port:
Implementing this is easy and gives flexibility to the operator to configure SSH.
Describe alternatives you've considered
A workaround is to create a file
~/.ssh/configcontainingPort 22.Additional context
In my case, I'm deploying a Rails app with Capistrano which first tries the
git ls-remote git@gitlab.com:group/project.gitand it fails.