vscode remote ssh connection fails after disk change

Viewed 8

After changing the (one and only) disk on my remote server, and reinstalling the OS (Ubuntu 22.04) vscode remote connections to that server fail with the message:

Could not establish connection to "oric": Remote host key has changed, port forwarding is disabled.

I have removed references to the server, oric, in the host's known_hosts file, but that did not fix the problem.

How do I tell vscode that this server with the same name is actually new / different than what it knew before?

Thanks.

1 Answers

It turned out there was more than one reference to the server in the known_hosts file. Deleting all of them fixed the problem.

Related