Vscode remote connection server reports an error: could not establish connection to “XXXXXX” [resolved]

Suppose you have made the following configuration and try

    install remote SSH in the extensions, add the IP address of the server you want to access, and have a config file (as shown in the figure below)
    please remember the path of this config file, which is generally “C: \ users \ user”_ Name \. SSH \ config “
    so you start trying to connect to the server. After selecting Linux/windows from the top drop-down menu, you unfortunately fail

    Error message:

    After the popup window of could not establish connection to “XXX” appears, check the error information below. If the error information contains:


      Open extensions in the left column, find the installed remote SSH, right-click, select “extension settings”
      , enter the config file path in config file, and try to connect again. It is found that the connection is successful

Read More: