While openssh is fully able to make use of the user specified in in ~/.ssh/config file, paramiko fails to load it from there and this can cause a huge reange of confusing authentication errors, none of them directly indicating a wrong user.
I spend hours and hours tryign to figure out why some paramiko applications where failing to connect and getting errors like PasswordRequiredException when the real issue was just the username.
I had to enable debbuging on the ssh server in order to dicover that.
Can we do something to address this issue, it seems that I am not an isolated case confused by this behavior.
I think you need to do this simply explicitly (paramiko supports reading OpenSSH config files programmatically) see https://github.com/docker/docker-py/pull/2290. Its not a bug its a feature ;)
@riedel If I understand you correctly, the goal of your linked PR is to have the behaviour @ssbarnea wants by default. Therefore I consider the many downvotes of your comment as a misunderstanding. You do agree that ~/.ssh/config should be considered by docker-compose, right?
Well, I personally think it is perfectly fair for a library like paramiko to let the frontend program (compose in this case) handle things by only offering a config parser. I guess it is not a convenient default behaviour with duplicate manual work in all frontends involved (see the PR) hence the down votes.