Alibaba Cloud Container Service allows you to log on to clusters by using SSH key pairs, which guarantees the security of SSH remote access.
- Log on to the Container Service console.
- Under Kubernetes, click Clusters in the left-side navigation pane.
- Click Create Kubernetes Cluster in the upper-right corner.
- Select Key Pair in the Login field. Complete the other configurations. For more information,
see Create a cluster. Then, click Create.
- If you have created key pairs in the Elastic Compute Service (ECS) console, select a key pair from the Key Pair Name drop-down list.
- If you have no key pair, click Create a new key pair to create one in the ECS console. For more information, see Create an SSH key pair.
- After the cluster is created, click Manage at the right of the cluster on the Cluster List page. View the Master node SSH IP address under Connection Information.
- Download the .pem private key file. Complete the configurations based on your local operating system
environment, such as Windows or Linux. For more information, see Connect to a Linux instance by using an SSH key pair. Take Linux as an example.
- Find the path where your downloaded .pem private key file is stored on your local
machine. For example,
- Run the following command to modify the attributes of the private key file:
chmod 400 [path where the .pem private key file is stored on the local machine]. For example,
chmod 400 /root/xxx.pem.
- Run the following command to connect to the cluster:
`ssh -i [path where the .pem private key file is stored on the local machine] root@[master-public-ip]. Wherein, master-public-ip is the master node SSH IP address. For example,
ssh -i /root/xxx.pem email@example.com.
- Find the path where your downloaded .pem private key file is stored on your local machine. For example,