[VScode] VScode Remote 报错:Could not establish connection to "workspace": Port forwarding is disabled.

VScode Remote 报错·Bug陈列

Could not establish connection to "workspace": Port forwarding is disabled.

这个网站中列举了一些可能的错误原因:

https://stackoverflow.com/questions/60507713/vscode-remote-ssh-connection-failed

我遇到的问题是,远程主机的ssh key可能被修改过,但是在.ssh/known_hosts中依然缓存着旧的key,导致登入失败。

解决方法:删除known_hosts中对应的行即可,刷新缓存。

posted @ 2023-02-18 19:44  CQzhangyu  阅读(179)  评论(0编辑  收藏  举报