Instance Directory in VS Code Does Not Match That on the Cloud When VS Code Is Used to Connect to an Instance
Symptom
When a user uses VS Code to connect to an instance, the instance directory in VS Code does not match that on the cloud.
Possible Causes
The instance connection is incorrect. The possible cause is that the configuration file is not properly written.
Solution
- Check the .ssh configuration file (generally in the C:\Users\{User}\.ssh\config directory) and check whether each group of configuration is standard. Host must be placed in the first line of each group of configuration as the unique ID.
As shown in the following figure, Host is placed in the last line of the first group of configuration. The user wants to connect to the Host ModelArts-Note-BmjiN instance. However, the SSH connection identifies and connects to the Host ModelArts-Note-wZc6s instance based on the Host field.
- Update the configurations according to the standard format of ssh-config. Host is the unique ID of each group of configuration. It is mandatory and must be placed in the first line of the configuration file.
Host ModelArts-notebook-xxx HostName authoring-ssh-modelarts-example.huawei.com Port 31215 User ma-user IdentityFile c:\Users\xxx\KeyPair-xxx.pem StrictHostKeyChecking no UserKnownHostsFile /dev/null ForwardAgent yes
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot