要用 ssh 遠端連線至用Virtualbox安裝的 Ubuntu ,但 VSCode 會一直很囉唆地要我選伺服器種類,我在別的地方的電腦不會詢問這個問題。
選了之後然後有時候可以連上有時候會直接跳以下錯誤:
然後 VSCode 的終端機內印出的訊息如下:
>
>
>
[00:20:25.947] > username@192.168.1.99's password:
[00:20:25.947] Showing password prompt
[00:20:29.822] Got password response
[00:20:29.822] "install" wrote data to terminal: "********"
[00:20:29.834] >
>
[00:20:29.862] > ccc0cb9fe625: running
>
[00:20:29.880] > Acquiring lock on /home/username/.vscode-server/bin/ff915844119ce9485abfe8aa9076ec7
> 6b5300ddd/vscode-remote-lock.iskku.ff915844119ce9485abfe8aa9076ec76b5300ddd
>
[00:20:29.889] > \ln /home/username/.vscode-server/bin/ff915844119ce9485abfe8aa9076ec76b5300ddd/vsco
> de-remote-lock.iskku.ff915844119ce9485abfe8aa9076ec76b5300ddd.target /home/username
> /.vscode-server/bin/ff915844119ce9485abfe8aa9076ec76b5300ddd/vscode-remote-lock.
> username.ff915844119ce9485abfe8aa9076ec76b5300ddd
> Found existing installation at /home/username/.vscode-server/bin/ff915844119ce9485a
> bfe8aa9076ec76b5300ddd...
>
[00:20:29.897] > Found running server...
>
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>
>
[00:20:29.916] > Neither wget nor curl is installed
> ccc0cb9fe625##26##
>
[00:20:29.916] Received install output: ccc0cb9fe625##26##
[00:20:29.916] Neither curl nor wget is installed - can't download the Server
[00:20:29.917] Resolver error: Downloading VS Code Server failed - please install either curl or wget on the remote.
[00:20:29.919] ------
[00:20:30.316] "install" terminal command done
[00:20:30.316] Install terminal quit with output:
如果用一般終端機軟體可以正常透過ssh連上伺服器。
我有試過以下方法:
請問該怎麼排除呢?謝謝。
剛試了一下
模擬一下沒有網路會發生什麼事
不過我沒辦法建 vm
所以弄了兩台 ec2
分別放在 public subnet 跟 private subnet
然後利用 public 的那台當作 bastion 跳轉進去 private
結果也是正常可以用 vscode ssh 進去
所以有無網路應該是不會影響
或許你可以照他說的
檢查一下 curl 或者 wget 的安裝狀態
我是不是老土了?還在用WinSCP+VSCODE在管理LINUX上的程式碼.....
我遇過這個問題,透過編輯C:\User....ssh\config已經解決了!!
(以"ssh Amy@123.456.78.999 -p 22"為例)
config file格式應為:
Host MyHostName
HostName 123.456.78.999
User Amy
Port 22