VScode remote ssh no longer connecting

Posted September 13, 2021 1k views
VS Code

I setup vscode remote ssh from my mac to my digital ocean droplet, but now it won’t connect. It is not giving me any error codes or anything. When I was trying to fix this I deleted my .vscode-server folder.

I can connect in terminal to all users but vscode is not functioning anymore (it worked last night and I’ve changed nothing). It was hanging this morning when I opened my computer. I closed it and lost some changes and then tried to log back in via remote ssh and it just fails to connect.

I’m running centos 7 on the droplet and mac Catalina on my computer. The other droplets I’ve setup seem to work fine.

I’m getting a permission denied error. I’ve double checked my authorized keys and still no luck.

darwin x64
SSH Resolver called for "ssh-remote+{my droplet name}", attempt 1
SSH Resolver called for host: {my droplet name}
Setting up SSH remote "{my droplet name}"
Using commit id "{the commit id}" and quality "stable" for server
Testing ssh with ssh -V
ssh exited with code: 0
Got stderr from ssh: OpenSSH_8.1p1, LibreSSL 2.7.3
Running script with connection command: "ssh"  -o ClearAllForwardings=true -o ConnectTimeout=15   "{my droplet name}" bash
Install and start server if needed
> centos@{myIP}: Permission denied (publickey).
"install" terminal command done
Received install output: centos@{myIp}: Permission denied (publickey).
Failed to parse remote port from server output: centos@{myIp}: Permission denied (publickey).

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hello, @carlossaragon12

You might have multiple vscode hanging processes on your server. Can you share the output of the following command when executed on your CentOS 7 droplet/server:

  • ps aux | grep vscode