Help Center/ ModelArts/ Troubleshooting/ DevEnviron/ Failures to Access the Development Environment Through VS Code/ Error Message "Connection permission denied (publickey)" Is Displayed
Updated on 2024-12-30 GMT+08:00

Error Message "Connection permission denied (publickey)" Is Displayed

Symptom

Error message "Connection permission denied (publickey)" is displayed when VS Code is connecting to a development environment. Please make sure the key file is correctly selected and the file permission is correct. You can view the instance keypair information on ModelArts console."

Possible Causes

The permission on the key file or the folder where the key is stored is incorrect, or the key is incorrect.

Solution

  1. Change the permission for the /home/ma-user directory. You are advised to set the permission to 755 or 750 to ensure user isolation and security.
    chomd 755 /home/ma-user
    chomd 750 /home/ma-user
  2. Check whether the key is the same as that bound to the instance.
    1. Stop the instance and go to the instance details page.
    2. Update the key. Click the Edit icon next to Authentication, and then click Create to create a key and then select it.

    3. Use VS Code to connect to the instance again and select the new key.