Visual Studio Code can’t connect the host for ‘Host key verification failed’
In my story , Be careful of the ‘id_rsa’ file, when your .ssh directory has the ‘id_rsa’ file that your IdentityFile config will not available. that really takes me a lot of time to realize it, because when the output for failed all we can know is ‘Host key verification failed’ and can’t see which key file is actually use(I think that quietly no sense).
as we all know when we want to use vscode to connect to a new server, we need to add your new host in the .ssh/config file :
Host hostname(whatever name you want)
But be careful: when the .ssh directory has id_rsa file, the IdentityFile your config is not available, and always use the default file id_rsa as your key file. I fall into this trap and waste much time on it.