Logging In to a Linux ECS Using CloudShell
Scenarios
This section describes how to use CloudShell provided on the management console to log in to an ECS.
For instructions about how to copy and paste data on CloudShell pages after the ECS login, see Common CloudShell Operations.
Constraints
For details about the supported regions, see "Linux ECS Login" in the Function Overview.
Prerequisites
- The target ECS is running.
- The login port (port 22 by default) was opened. If a different port is required, use the default port to log in to the ECS and then change the port number.
For details about how to change the remote login port, see How Can I Change a Remote Login Port? For details about how to configure security group rules, see Configuring Security Group Rules.
- The password for logging in to the target ECS has been set. If you did not set a password when creating the ECS, reset the password before logging in to the ECS.
- You can use CloudShell to connect to an ECS through a public or private network. When you choose to connect through a private network, service authorization needs to be performed by a user with the Security Administrator permissions.
- 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:
- Create a user group and assign the Security Administrator permissions to the user group. For details, see Creating a User Group and Assigning Permissions.
- 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.
- If the Service authorization page is displayed, it means you have the Security Administrator permissions. Click Agree.
Procedure
- Log in to the management console.
- Click in the upper left corner and select your region and project.
- Click . Under Compute, click Elastic Cloud Server.
- In the Operation column of the target ECS, click Remote Login.
- In the Logging In to a Linux ECS dialog box, click Log In in CloudShell-based Login.
- Configure the ECS details on the CloudShell page.
Upon the first login, the CloudShell configuration wizard is displayed by default. Enter required parameters to connect to the ECS.
You can use the EIP or private IP address of the ECS to log in.
- If you select the EIP bound to the ECS:
- In the CloudShell configuration wizard, set the port (22 by default), username, authentication type, and password (or key) of the ECS.
- Click Connect.
If the system does not respond, the password is incorrect or has not been set. In this case, reset the password and try to log in to the ECS again.
Figure 2 CloudShell configuration wizard (EIP)
After the login is successful, the following figure is displayed.Figure 3 Successful login
- If you select the private IP address of the ECS:
- Click Go to open the CloudShell configuration wizard.
Figure 4 CloudShell configuration wizard (private IP) 1
- In the CloudShell configuration wizard, set the port (22 by default), username, authentication type, and password (or key) of the ECS.
- Click Connect.
If the system does not respond, the password is incorrect or has not been set. In this case, reset the password and try to log in to the ECS again.
After the login is successful, the following figure is displayed.Figure 5 Successful login
- Click Go to open the CloudShell configuration wizard.
- If you select the EIP bound to the ECS:
Common CloudShell Operations
- New session
Choose Terminal > New Session in the top navigation bar to open a new session.
- Keyboard shortcuts
Use keyboard shortcuts to edit commands.
Table 1 Keyboard shortcuts for CloudShell Shortcut
Action
Ctrl+L
Moves the current line to the first line.
Ctrl+U
Clear the current line.
Ctrl+H
Delete one character forward.
Ctrl+A
Move the cursor to the beginning of the command line.
Ctrl+E
Move the cursor to the end of the command line.
- Copy & Paste
Data can be copy-pasted across local and remote terminals by right-clicking the target file and choosing Copy and Paste, or using keyboard shortcuts Ctrl+C and Ctrl+V.
- Historical records
Scroll up or down the terminal to view historical records. By default, only the latest 1,000 lines of historical records are retained for terminals.
- Customized layout for multiple terminals
You can create multiple CloudShell terminals on the same page and drag panes to customize the layout.
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