Useful or not, from you.
vscode-docker In order to use an SSH DOCKER_HOST on OS X and Linux, you must configure an ssh-agent.

I doubt setting of SSH_AUTH_SOCK variable is necessary. I keep it undefined, but have IdentityAgent, IdentityFile, AddKeysToAgent in my .ssh/config. However the code referenced at the top makes my configuration unusable for this extension, while it perfectly works everywhere else outside vscode-docker.

Can this check be removed or replaced with something else? There are other options for SSH to avoid interactive password prompt, such as BatchMode or IdentitiesOnly.

Thank you!

That's a useful answer
Without any help

Dockerode indeed does not respect it, unfortunately; Dockerode is using the ssh2 node package which does not use .ssh/config. I would suggest filing this there because it would be a better solution for it to be implemented there (in ssh2).