Help Center/ ModelArts/ FAQs/ Notebook (New Version)/ Failures to Access the Development Environment Through VS Code/ Basic Problems Causing the Failures to Access the Development Environment Through VS Code
Updated on 2024-06-15 GMT+08:00

Basic Problems Causing the Failures to Access the Development Environment Through VS Code

If the VS Code fails to connect to the development environment, perform the following steps:

  1. Check whether the plug-in package is of the latest version. Search for the plug-in in extensions and check whether it needs to be upgraded.

  2. Check whether the instance is running. If yes, go to the next step.
  3. Run the following command in VS Code's Terminal to connect to the remote development environment:

    ssh -tt -o StrictHostKeyChecking=no -i ${IdentityFile} ${User}@${HostName} -p ${Port}

    Parameters:

    - IdentityFile: path to the local key

    - User: username, for example, ma-user

    - HostName: IP address

    - Port: port number

    If the connection is successful, go to the next step.

  4. Check whether the configuration is correct. If yes, go to the next step.

    Check the config file.

    HOST remote-dev
         hostname <instance connection host>
         port <instance connection port>
         user ma-user
         IdentityFile ~/.ssh/test.pem
         StrictHostKeyChecking no
         UserKnownHostsFile /dev/null
         ForwardAgent yes

  5. Check the key file. You are advised to save the key file in C:\Users\xx.ssh and ensure that the file does not contain Chinese characters.
  6. If the fault persists, rectify it by referring to the FAQs in follow-up sections.