Skip to content

[question] Can I forward ssh connection to container (for the git user)? #1020

Description

@averissimo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions