Updated on 2024-12-03 GMT+08:00

Logging In to a Linux FlexusL Instance Using CloudShell

Scenarios

This section describes how to use CloudShell to log in to a Linux cloud server. After login, if you need to use the copy-and-paste function provided by CloudShell, see Common CloudShell Operations.

Prerequisites

  • The status of the FlexusL instance must be Running.
  • You have obtained the login username and password. If you have forgotten the password, reset the password.
  • The login port (port 22 by default) has been allowed by security group rules. For details about how to configure security group rules, see Configuring Security Group Rules for a FlexusL Instance.

    If a different port is required, you can use the default port to log in to the cloud server and then change the port number.

  • You can use CloudShell to connect to the cloud server through a public or private network. When you choose to connect through a private network, service authorization is required.
    • If the Service authorization page is displayed, it means you have the Security Administrator permissions. Click Agree.
      The service authorization takes effect at the region level and is required only when you use CloudShell for the first time in a specific region.
      Figure 1 Service authorization
    • If you do not have the Security Administrator permissions, a page will be displayed, requiring you to contact the administrator to assign permissions to you.

      Perform the following steps to assign permissions:

      1. Create a user group and assign the Security Administrator permissions to the user group. For details, see Creating a User Group and Assigning Permissions.
      2. Add the user to the user group. For details, see Adding Users to or Removing Users from a User Group.

      When you use CloudShell to remotely connect to an ECS through a public network, service authorization is not required.

Procedure

  1. Log in to the FlexusL console.
  2. Log in to a cloud server using any of the following methods.
    • In the FlexusL area, locate the target instance and click Remote Login.

    • Locate the target instance and click Remote Login in the upper right corner.
    • Locate the target instance, click Cloud Servers in the navigation pane on the left, and click Remote Login.

  3. In the displayed dialog box, click Log In via CloudShell in the CloudShell Login area.
  4. On the CloudShell page, configure information required for logging in to the FlexusL instance server.

    When you log in for the first time, the CloudShell configuration wizard is displayed by default. Enter the parameters required for logging in to the cloud server.

    Retain the default values of Region and ECS. Select either the EIP or the private IP address to log in.
    • Using the EIP
      1. Configure parameters for logging in to the cloud server.
        Table 1 Parameters for logging in to the cloud server

        Parameter

        Description

        Port

        Connection port, which is 22 by default.

        Ensure that the login port (port 22 by default) has been allowed by security group rules. For details about how to configure security group rules, see Configuring Security Group Rules for a FlexusL Instance.

        User

        Username for logging in to the cloud server, which is root by default.

        Auth-Type

        Select Password-based and enter the password for logging in to the cloud server.

        If you have not set the password or forgot the password, reset it.

        Session Name

        The default format is Username@IP address. You can change it as needed.

      2. Click Connect.

        If a message is displayed indicating that the authentication fails, the possible cause is that the login password is not set or incorrect. Reset the password and try again.

        After the connection is successful, a figure similar to the following is displayed:
        Figure 2 Successful login
    • Using the private IP address
      1. Click Go.

        If a message is displayed indicating that you do not have required permissions or an authorization is required, complete the service authorization as instructed in the Prerequisites first.

      2. On the new CloudShell configuration wizard page, configure parameters for logging in to the cloud server.

        The configuration method using a private IP address is the same as that using an EIP. For details, see Table 1.

      3. Click Connect.

        If a message is displayed indicating that the authentication fails, the possible cause is that the login password is not set or incorrect. Reset the password by following Resetting the Password for a FlexusL Instance and try again.

        After the connection is successful, a figure similar to the following is displayed:
        Figure 3 Successful login