Skip to content

Commit 1e9e814

Browse files
committed
Sort out SSH configuration in MCP gateway
Signed-off-by: Nikola Forró <[email protected]>
1 parent 56b02d7 commit 1e9e814

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Containerfile.mcp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,22 @@ RUN mkdir /git-repos && chmod -R o+rwX /git-repos
3434
COPY files/Current-IT-Root-CAs.pem /etc/pki/ca-trust/source/anchors/
3535
RUN update-ca-trust
3636

37+
# Configure jump host for internal dist-git
38+
COPY <<EOF /etc/ssh/ssh_config.d/00-dist-git.conf
39+
Host iad2
40+
Hostname bastion-iad2.corp.redhat.com
41+
GSSAPIAuthentication yes
42+
Host pkgs.devel.redhat.com
43+
ProxyJump iad2
44+
EOF
45+
# Set up internal dist-git and GitLab SSH host keys
46+
COPY files/internal_dist-git_host_keys /etc/ssh/ssh_known_hosts
47+
RUN ssh-keyscan bastion-iad2.corp.redhat.com gitlab.com >> /etc/ssh/ssh_known_hosts
48+
3749
USER mcp
3850
ENV HOME=/home/mcp
3951
WORKDIR $HOME
4052

4153
ENV PYTHONPATH=$HOME:$PYTHONPATH
4254

43-
RUN mkdir ~/.ssh \
44-
&& chmod 0700 ~/.ssh \
45-
&& ssh-keyscan pkgs.devel.redhat.com >> ~/.ssh/known_hosts
46-
4755
CMD ["/bin/bash"]

files/internal_dist-git_host_keys

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
pkgs.devel.redhat.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBDT8I6l839M7tb6V/Le8x3pGo3sTo6SG/kMrVwPQ6kUtxuaWKBLCmI1HVawfRbBz4fO+8AifdKjtOKUHcI6iPr8=
2+
pkgs.devel.redhat.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsc8DV5JsCx3dhD5BF2PPnUxZQsVWQ0ODLegg+3Sf898NrEtQaQiIgMf826whS0HLIcj1aspMe0W83zGH7GZEPMW3Y/Xche1kFdfmsnovdWwxE01edFN2B7h56NYB+Ec3zqd1/QUGeAKa+hde42/JFHyl2jrA+xbnhmaCcGvZFtLAQ4gCi7j/MY/2SHuFC+kj7LcyNMUC3GdY9IpbtrY2SRUBQa+WMw4X1rrTWpn0dyCLLu5eE+xGZ9aAkZjNyMQRPuG13ilWVWkU6olIphnT9lJ245P9xabuQOuMGxm0oih0zJLc/e5SH4HYj7MDXnKXXYMBuzlwqA7L73HVSwhGD

0 commit comments

Comments
 (0)