You need to enable JavaScript to run this app.
Elastic Compute Service

Elastic Compute Service

Copy page
Download PDF
Logging in to a Linux instance
Using the console to log in to a Linux instance
Copy page
Download PDF
Using the console to log in to a Linux instance
In the ECS console, you can log in to an instance that runs the Linux operating system through ECS Terminal or VNC.​
Limits​
The number of users that can remain logged in to an ECS instance varies based on the login method and user type. See details in the following table:​
​
User type​
VNC​
ECS Terminal​
Cloud platform account​
Multiple authorized accounts (primary accounts or IAM users) can log in to an instance at the same time. The number of accounts is not limited.​
tip​
When multiple accounts are logged in, they can see the same console and share all actions.​
A primary account (including all IAM users under it) can have a maximum of 100 remote connections open at the same time.​
Operating system user​
Only one user can log in to an instance at a time.​
You can log in as multiple users from different browser tabs at the same time.​
​
Prerequisites​
Make sure that the ECS instance to log in meets the conditions in the Login restrictions.​
Login procedure​
​
ECS Terminal (recommended)
VNC
​
tip​
  • Convenient interaction: You can directly copy or paste text when logging in to the instance with ECS Terminal. Therefore, we recommend you use ECS Terminal to enjoy a smooth user experience. ECS Terminal is applicable to scenarios where the instance is in the Running state and the operating system runs normally. If you use key for authentication, we recommend you use ECS Terminal for login.​
  • ECS Terminal offers multiple practical features, such as AI conversations, command completion, and error correction. For specific steps, refer toIntroduction to login tools.​
  1. Log in to the ECS console. ​
  1. In the top menu bar, select the project and region of the target instance.​
  1. Click "Connect" in the "Actions" column of the target instance.​
  1. Click "Log in now" under ECS Terminal.​
  1. On the remote login page, configure login information by referring to the table below.​
  • ​
    Configuration item​
    Note​
    Port​
    When you log in to a Linux instance, SSH uses its default port (22). Make sure the security group associated with your instance allows inbound TCP traffic on port 22.​
    tip​
    • If you need to change the connection port of your target instance, refer to Changing the ECS default remote port. After this, you can log in to the instance with the updated port.​
    Username​
    The default username for Linux instances is root.​
    tip​
    You can also create a new user and log in with a custom username.​
    Authentication method​
    • Password: The login password is the password set when you create the instance. If you forget your password, reset the password first.​
    • Key: If the instance is associated with a key pair, the name/ID of the key pair appears in the "Attach Key" section. Then click the​​icon to upload the corresponding private key for login. If you have lost the private key, or no key pair is associated with the instance, you need to associate a key pair with the instance before logging in.​
    tip​
    In addition to the above methods, for instances created from a custom image or shared image, you can also use the password or key pair preset in the image to log in to the instance. Learn more​
    ​
  1. You can check "Save the log in information and log in credentials, and quickly log in next time.". Then, click "Login".​
  • After login, you enter the terminal command page. The response is as follows:​
  • ​alt​​
​
​
​
Last updated: 2026.06.18 16:22:19