小编Ast*_*ate的帖子

Visual Studio Code 远程 SSH 权限被拒绝(公钥)

我使用的是 Mac OS,可以使用命令通过终端和 ssh 成功连接到主机

ssh -i ~/full/path/to/private_key name@ip
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试使用远程 SSH“连接到主机”在 Visual Studio Code 中使用完全相同的命令时,它返回“无法建立与“ip”的连接:权限被拒绝(公钥)”。

如何修复它?我尝试将本地公钥添加到主机上的authorized_keys中,但没有帮助。

ssh visual-studio-code vscode-remote-ssh

5
推荐指数
1
解决办法
5681
查看次数