VScode SSH远程连接失败

问题描述:

VScode重启更新后,SSH远程连接失败,反复尝试都不起作用。具体现象如下(因为解决以后log记录就没了,所以借了下别人的log):

[08:48:13.513] Server installation process already in progress - waiting and retrying
[08:48:14.517] Running script with connection command: ssh -T -D 58042 "192.168.31.235" bash
[08:48:14.518] Terminal shell path: C:\Windows\System32\cmd.exe
[08:48:14.900] > ]0;C:\Windows\System32\cmd.exe
[08:48:14.900] Got some output, clearing connection timeout
[08:48:14.933] "install" terminal command done
[08:48:14.933] Install terminal quit with output: 
[08:48:15.404] > 741b6048ee5c: running
[08:48:15.469] > Acquiring lock on /home/zhangyasheng/.vscode-server/bin/c3f126316369cd610563c75b
> 1b1725e0679adfb3/vscode-remote-lock.zhangyasheng.c3f126316369cd610563c75b1b1725e
> 0679adfb3
[08:48:15.478] > Installation already in progress...
> If you continue to see this message, you can try toggling the remote.SSH.useFloc
> k setting
> 741b6048ee5c: start
> exitCode==24==
> listeningOn====
> osReleaseId==ubuntu==
> arch==x86_64==
> tmpDir==/run/user/1017==
> platform==linux==
> unpackResult====
> didLocalDownload==0==
> downloadTime====
> installTime====
> extInstallTime====
> serverStartTime====
> 741b6048ee5c: end
[08:48:15.478] Received install output: 
exitCode==24==
listeningOn====
osReleaseId==ubuntu==
arch==x86_64==
tmpDir==/run/user/1017==
platform==linux==
unpackResult====
didLocalDownload==0==
downloadTime====
installTime====
extInstallTime====
serverStartTime====

原因分析:

        通过其他工具可以正常的与服务器建立SSH连接,所以问题的所在与SSH服务本身无关。

根据vscode ssh连接失败_myWorld001的博客-CSDN博客这篇文章的说明分析,SSH连接不上是因为VScode更新后,~/.vscode-server/bin中的文件过期了导致的。



解决方案:

        将~/.vscode-server/bin/xxxxxxxxxxxxxxx文件删除(具体删除哪个文件要看log中用的是哪个文件),然后重新进行SSH连接即可。


                                                      更多精彩内容,请关注公众号

  • 9
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值