Docker Community Forums

Share and learn in the Docker community.

Cannot ssh from inside a container to outside repository

I am installing Akeneo 3.2 in Docker Desktop for Mac. It works fine on OSX prior to Big Sur, but fails on Big Sur when it comes to accessing Akeneo’s repository from inside a container in docker.

I can: ssh git@distribution.akeneo.com -p 443 outside of docker successfully.

Here are the results:

Donalds-MacBook-Pro:cf32 don$ ssh git@distribution.akeneo.com -p 443
PTY allocation request failed on channel 0
hello papo-donaldb-city-furniture-com-1, this is git@distribution running gitolite3 3.6.11-2 (Debian) on git 2.20.1

 R  	InnerVariationBundle
 R  	pim-enterprise-onprem-paas
Connection to distribution.akeneo.com closed.

I cannot: docker-compose exec fpm ssh git@distribution.akeneo.com -p 443.

Here’s the output from ssh:

Donalds-MacBook-Pro:cf32 don$ docker-compose exec fpm ssh -vvv git@distribution.akeneo.com -p 443
OpenSSH_7.4p1 Debian-10+deb9u7, OpenSSL 1.0.2u  20 Dec 2019
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: resolving "distribution.akeneo.com" port 443
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to distribution.akeneo.com [51.15.150.66] port 443.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/docker/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4p1 Debian-10+deb9u7
ssh_exchange_identification: Connection closed by remote host

I tried both giving the docker container access through a volume and using SSH_AUTH_SOCK.