Question

VScode remote ssh no longer connecting

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.

remote-ssh@0.45.2
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).

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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:

  1. ps aux | grep vscode

Regards, Alex