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 a Windows host to log in to a Linux instance
Copy page
Download PDF
Using a Windows host to log in to a Linux instance
Applicable scenarios​
This topic describes how to log in to a Linux ECS instance from a Windows host.​
​
Operating system of the local host​
Operating system of the ECS instance​
Login tool on local host​
Login authentication method​
Windows​
Linux​
Command Prompt--SSH command or PuTTY​
Password and key​
​
Prerequisites​
  • Make sure that the ECS instance you log in to meets the conditions in the Login restrictions.​
Password login procedure​
​
Use SSH
Use PuTTY
​
  1. On the local host, click "Start" and open the "Command Prompt" terminal.​
  1. Enter the following SSH command.​
  • ​
    ssh <root>@<The EIP address of the Linux ECS instance>​
    ​
  1. Input the password of the root user and press the Enter key to log in to the Linux ECS instance.​
​
Password login procedure​
​
Use SSH
Use PuTTY
​
  1. On the local host, click "Start" and open the "Command Prompt" terminal.​
  1. Run the following commands in sequence to make the private key file readable to the current logged-in user.​
  • ​
    icacls <The absolute path of the .pem private key file on the local host> /grant <The username of the local host>:F​
    icacls <The absolute path of the .pem private key file on the local host> /inheritancelevel:r​
    ​
  1. Run the following command to log in to the instance.​
  • ​
    ssh -i <The file path of .pem private key file on the local host> <Username of the Linux instance>@<EIP address of the Linux instance>​
    ​
  1. Press the Enter key to log in to the instance.​
​
Last updated: 2026.06.18 16:22:21