Visual studio code 尝试通过SSH将VS代码连接到php服务器时出错

Visual studio code 尝试通过SSH将VS代码连接到php服务器时出错,visual-studio-code,ssh,remote-access,Visual Studio Code,Ssh,Remote Access,我正在尝试将VS代码连接到远程PHP服务器。我正在使用插件:Remote-SSH 当VS代码尝试创建服务器目录时,我收到的错误似乎是权限错误。我知道我已正确通过服务器身份验证,因为我收到以下消息: 通过mysite.com认证 但它没有说: [13:09:14.266] > Creating the server install dir failed... > a6d316dda249##34## [13:09:14.267] Received install output: a6d

我正在尝试将VS代码连接到远程PHP服务器。我正在使用插件:Remote-SSH

当VS代码尝试创建服务器目录时,我收到的错误似乎是权限错误。我知道我已正确通过服务器身份验证,因为我收到以下消息:

通过mysite.com认证

但它没有说:

[13:09:14.266] > Creating the server install dir failed...
> a6d316dda249##34##
[13:09:14.267] Received install output: a6d316dda249##34##
[13:09:14.268] Terminating local server
[13:09:14.269] stderr> mkdir: cannot create directory ‘/var/www/vhosts/.vscode-server’: Permission denied
[13:09:14.275] Resolver error: Error: Failed to create the remote server's install directory
我相信这是因为如果不先键入sudo就无法访问我的根目录

有人能帮我弄清楚我能做什么来连接到这个服务器吗。我可以用升华文本来做,但我不想用升华

谢谢