This article is based on one of the issues I was facing while configuring VSCode Remote - SSH.
Earlier Parts
How to Setup Passwordless SSH Login on Windows
configure remote ssh extension on visual studio code
Here I configured second linux host in ssh config file. This one is not passwordless.
When I connect to the second linux server for first time it asked to verify fingerprint key of linux and continue, it will confirm connecting yes, If you don't press connect you will receive popup Could not establish connection to 'IP/FQDN' Connecting was canceled. Next Enter password for root, Click details in the bottoms to check logs on OUTPUT tab.
You will receive similar error Copying file to remote with scp vscode-server-linux.x64.tar.gz vscode-scp-done.flag IP:~/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a81619/. To resolve this issue download vscode-server-linux.x64.tar.gz from url https://update.code.visualstudio.com/commit:c7d83e57cd18f18026a8162d042843bda1bcf21f/server-linux-x64/stable and upload on linux under folder ~/.vscode-server/bin/8795a9889db74563ddd43eb0a897a2384129a81619/. Once the file copied try connecting with remote ssh again. It will be successful.
You can see the file I have copied the file manually using winscp, once file is copied extract / untar it with command tar xvzf vscode-server-linux.x64.tar.gz
Useful Articles
Docker Error response from daemon i\o timeout internet proxy
Cannot connect to the Docker daemon at unix:var run docker.sock. Is the docker daemon running
How to install Docker on Linux
How to install Ansible on Linux for vSphere configuration