我参考的是这篇文章
https://zixizixi.cn/windows_vscode_ssh_error_bad-owner-or-permissions
直接上解决方法:
1.在github上下载openssh-portable项目 ,
在gitbush上输入如下指令
git clone git@github.com:PowerShell/openssh-portable.git
2.下载完成后在openssh-portable项目中的contrib\win32\openssh目录中打开PowerShell命令行,也可以win+X+A打开powershell然后cd进那个目录
输入如下指令
Set-ExecutionPolicy RemoteSigned
然后按Y
再输入
Set-ExecutionPolicy RemoteSigned
再按N
问题即可解决