Elastic Cloud Server

Log in to a Linux Cloud Server from macOS

2025-11-17 06:28:17

Scenario

This section uses the "Terminal" that comes with the Mac OS system to remotely connect to the Linux OS cloud server.

Prerequisites

· The cloud server is in the Running state.

· You have obtained the username and password of the Linux cloud server. If you forget the password, you should reset it. For details, see Reset ECS Password in Console.

· The Elastic Cloud Server has been bound to an Elastic IP.

· Port 3389 has been opened to the inbound security group.

Procedure

You can log in to the Linux cloud server through the built-in terminal of the Mac OS system:

· SSH password-based

1. Open the built-in terminal of the system and execute the following command

ssh username@elastic IP        

Note  

If it is a public image (including CoreOS), the username is "root".            

1. Enter the login password and press Enter to complete the login.

· SSH key-based

1. Open the system's built-in Terminal application.

2. Execute the following command in the terminal to change the permissions of the key file. The following steps take the private key file kp-101.pem as an example.

chmod 400 /path/kp-101.pem                

Note 

"path" in the above command refers to the storage path of the private key file.           

1. Execute the following command to log in to the cloud server.

ssh -i /path/kp-101.pem username@elastic IP              

Note

If it is a public image of "CoreOS", the username is "core".

If it is a "non CoreOS" public image, the username is "root".


HowIWGOZ.ggw