Scenario
I have gitlab running using these docker images and I want to use ssh both for git (container) and to login to the host.
Questions
- Can it be done via the
ForceCommand in sshd of the host? (having also a git user on host)
- I've tried with
ForceCommand ssh git@localhost -p 10022 $SSH_ORIGINAL_COMMAND but I still require to pass the same publickey in order for gitlab-shell to know which user it is (otherwise it thinks it is simple git from host)
- Is there any other way to forward ssh to container by User? (firewall/sshd_config/something else)
- Should I have a gitlab-shell running on host that is connected to container?
How I have it now
Have port 22 for git alone and use something else for all other ssh
Scenario
I have gitlab running using these docker images and I want to use ssh both for git (container) and to login to the host.
Questions
ForceCommandin sshd of the host? (having also a git user on host)ForceCommand ssh git@localhost -p 10022 $SSH_ORIGINAL_COMMANDbut I still require to pass the same publickey in order for gitlab-shell to know which user it is (otherwise it thinks it is simple git from host)How I have it now
Have port 22 for git alone and use something else for all other ssh