Help Center/ Cloud Operations Center/ User Guide/ Automated O&M/ Account Management/ Logging In to an ECS Without a Password
Updated on 2026-10-28 GMT+08:00

Logging In to an ECS Without a Password

During routine cloud O&M, O&M personnel often need to log in to different types of Linux ECSs to run commands. However, each login requires a password, which is inefficient and may increase security risks due to frequent password input. To address this challenge, COC supports password-free login to hosts through the account management function. When performing operations, you can select the target account in the password-free login module and directly access the host command execution page without entering the password again. This greatly improves O&M efficiency and security.

Prerequisites

Note that the account must meet the following conditions:

Constraints

  • Password-free login is supported only in CN North-Beijing4 and CN North3.
  • Currently, this function applies only to Linux hosts of the ECS type.

Precautions

Prerequisites for a successful remote login to a host:

  • UniAgent has been installed and is running on the target host. The UniAgent version must be later than or equal to 1.1.6.
  • The host is in the running state.
  • Accounts configured in the baseline or imported accounts can be found on the target host.
  • The account has a home directory. The preset directory is /home/account name.

    If an account does not have a home directory, run the following command to create a home directory so that the password-free login function can be used.

    Assume that the username is user1.

    • Create a directory. (-p ensures that the parent directory is available. If the /home directory cannot be found, it will be automatically created.)
      sudo mkdir -p /home/user1
    • Copy all default configurations (including hidden files).
      sudo cp -r /etc/skel/. /home/user1/
    • Use the recursive function to change the owner and group of the /home/user1 directory and all its subdirectories and files to user user1 and group user1.
      sudo chown -R user1:user1 /home/user1
    • Set the permission to 700, that indicates only the owner has the permission.
      sudo chmod 700 /home/user1
    • The -d option specifies the new home directory path.
      sudo usermod -d /home/user1 user1

Logging In to an ECS Without a Password

  1. Log in to COC.
  2. In the navigation pane, choose Resource O&M > Automated O&M.
  3. In the Routine O&M area, click Account Management. The Account Management page is displayed.
  4. Access the Accounts > By Resource or Accounts > By Application tab page.

    • By Resource applies to all purchased host instances.
    • By Application applies to purchased hosts that have been bound to an application. If you select By Application, you need to select the target application or component.

  5. Select a resource type.

    By default, Elastic Cloud Server (ECS) is selected.

  6. In the account list, locate the target host account and choose More > Login Without Password in the Operation column.

    Figure 1 Logging In to an ECS Without a Password

  7. Select the target account from the drop-down list and click OK.

    The page for executing commands on the host is displayed.

    Figure 2 Selecting a login account
    Figure 3 Logging In to an ECS without a password