天天看點

VSCode遠端連接配接伺服器報錯:Could not establish connection to “xxxxxx”【已解決】假設你已經做好了如下配置和嘗試報錯資訊:解決方法:

假設你已經做好了如下配置和嘗試

  1. 在Extensions中安裝好了Remote -SSH
  2. 添加了你要通路的伺服器ip位址等資訊,并擁有了一個config檔案(如下圖)

    請記住這個config檔案的路徑,一般為“C:\Users\user_name\.ssh\config”

    VSCode遠端連接配接伺服器報錯:Could not establish connection to “xxxxxx”【已解決】假設你已經做好了如下配置和嘗試報錯資訊:解決方法:
  3. 于是你開始嘗試連接配接伺服器,選擇了最上方下拉菜單中的Linux/Windows之後,不幸失敗了

報錯資訊:

出現Could not establish connection to “xxx”的報錯彈窗後,檢視下方報錯資訊,若報錯資訊中含有:

VSCode遠端連接配接伺服器報錯:Could not establish connection to “xxxxxx”【已解決】假設你已經做好了如下配置和嘗試報錯資訊:解決方法:

解決方法:

  1. 左側欄打開Extentions,找到已經安裝好的Remote -SSH,右鍵點選,選擇“Extension Settings”
    VSCode遠端連接配接伺服器報錯:Could not establish connection to “xxxxxx”【已解決】假設你已經做好了如下配置和嘗試報錯資訊:解決方法:
  2. 在Config File中輸入剛才的config檔案路徑
    VSCode遠端連接配接伺服器報錯:Could not establish connection to “xxxxxx”【已解決】假設你已經做好了如下配置和嘗試報錯資訊:解決方法:
  3. 重新嘗試連接配接,發現成功了

繼續閱讀