Requires correct file permissions on key file but freezes if incorrect
Nothing special (same as the command line SSH client) but it provides no feedback. With the SSH key file being a regular (I mean, with the typical default Windows permissions, with inheritance on, etc), the command line SSH does this:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions for 'XXXX.key' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "XXX.key": bad permissions
And well, it completely refuses to connect until it really likes the permissions (basically - disable access direct or indirect (inheritance) to anyone other than the owner).
The extension replicates this behavior, but instead of displaying a message, it just stays on "Confirming that remote is connectable..." forever.
I met the same problem, which stopped me from connecting to the server without typing password.
Turns out we need to put the private key under %USERPROFILE% (C:\Users\jeremy in the following case). I successfully connect to my remote server with the key file with a config file like this:
Host [IP_ADRESS]
HostName [IP_ADRESS]
User [username]
Port [port]
IdentityFile "C:\Users\jeremy\.ssh\id_rsa"
I created the key pair in WSL and moved the private key file to C:\Users\jeremy\.ssh\id_rsa.
I just move local private key from C:\Users\XXX\.ssh\ to C:\Users\XXX, then everything goes well. Now, I can password-free login in the server by remote ssh.
This is really annoying and should be fixed. In the meantime I confirm creating a separate directory with arbitrary name suffices.
Put the config file and the private ssh key files into that directory and adapt paths in the config file accordingly, e.g.
Host my-machine.westeurope.cloudapp.azure.com
HostName my-machine.westeurope.cloudapp.azure.com
IdentityFile C:\Users\werle\ssh_for_vscode_azure\some-user.pem
User some-user
Then click in the lower left corner on the >< sign and choose "Open Configuration File", then point to the config file in that folder.

On Windows 10 managing permissions from a file solved the issue for me after I only granted read permissions to my user.
Right click on the file, Properties->Security->Advanced Click on Disable Inheritance Click on Add and grant your Windows user read permissions
Had the exact same error after a migration of my laptop from work, what i've found at, is that on my personal folder C:/User/myself there was an other account which had access. I removed it, leaving me, System, and Administrator only to have access rights to my folder, and the error went away after deleting this unknown account (which i suspect was used to migrate my data from my older laptop to my new one.)
Still got the error ( Permission denied (publickey).> The process tried to write to a nonexistent pipe.) with the solution by @siran. Solution:
After "Click on Disable Inheritance", choose "Convert ..." instead of "Remove all permission..."; then edit, and remove other users (my case: Account Unknown-SID).
I believe we handle bad permissions better now (you will still need to fix permissions yourself)