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.

https://github.com/microsoft/vscode-docker/blob/836a76500c1e3edaadccdea944dec31b3e586c2c/src/utils/refreshDockerode.ts#L63

https://github.com/microsoft/vscode-docker/blob/836a76500c1e3edaadccdea944dec31b3e586c2c/src/utils/refreshDockerode.ts#L81

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).