Help Center/ ModelArts/ Troubleshooting/ DevEnviron/ Failures to Access the Development Environment Through VS Code/ Error Message "Bad owner or permissions on C:\Users\Administrator/.ssh/config" Is Displayed
Updated on 2024-12-30 GMT+08:00

Error Message "Bad owner or permissions on C:\Users\Administrator/.ssh/config" Is Displayed

Symptom

Error message "Bad owner or permissions on C:\Users\Administrator/.ssh/config" is displayed when VS Code is connecting to a development environment.

Possible Causes

The permission to the SSH folder has been granted to other users, not only to the current Windows user, or the current user does not have the permission. In these cases, you only need to modify the permission.

Solution

  1. Find the SSH folder, which is typically located in C:\Users, for example, C:\Users\xxx.

    The file name in C:\Users must be the same as the Windows login username.

  2. Right-click the folder and choose Properties. Then, click the Security tab.
  3. Click Advanced. In the displayed window, click Disable inheritance. Then, in the Block Inheritance dialog box, click Remove all inherited permissions from this object. In this case, all users will be deleted.
  4. Add an owner. In the same window, click Add. In the displayed window, click Select a principal next to Principal. In the displayed Select User, Computer, Service Account, or Group dialog box, click Advanced, enter the username, and click Find Now. Then, the search results will be displayed. Select your account and click OK to close all windows.
    Figure 1 Adding an owner
  5. Close and open VS Code again and try to remotely access the SSH host. Ensure that the target key is stored in the SSH folder.