It was a problem with the config file.
The VSCode needs the “absolute” path.
In case of MacOS, ssh-copy-id
seems to only copy the absolute path relative to the user.
In other words, it omits “/Users/username
” before “/.ssh
“.
Adding “/Users/username
” in the IdentityFile
attribute in .ssh/config
solved the problem.