Get the App
SLTechnology News&Howtos  ›  Servers  › 

Method of binding a SSH key pair to one or more Linux instances

Shulou Source: shulou.com Published: 2022-06-02 04:24:58 09月30日 Update

This article mainly introduces the method of binding a SSH key pair to one or more Linux instances, which can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

AttachKeyPair

Bind a SSH key pair to one or more Linux instances.

Description

When you use this interface, you should be aware of:

Windows instance does not support SSH key pair.

When the SSH key pair is bound, the authentication of the user name and password is disabled.

If the instance is in a running (Running) state, the SSH key pair takes effect after restarting the instance (RebootInstance).

If the instance has been bound with a SSH key pair, the new SSH key pair automatically replaces the original SSH key pair.

Request parameter

Return parameters

All are common return parameters. See common parameters.

Example

Request example

Https://ecs.aliyuncs.com/?Action=AttachKeyPair&RegionId=cn-qingdao&KeyPairName=test&InstanceIds=["i-XXXXX"]&

Return the example

XML format

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E

JSON format

{"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"}

Error code

The following are the error codes specific to this API. For more error codes, please visit the API error Center.

Thank you for reading this article carefully. I hope the editor will be helpful in sharing the method of binding a SSH key to one or more Linux instances. At the same time, I also hope that you will support it, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!

Tags: Keys instances parameters errors multiple methods examples articles interfaces formats status support value content at the same time passwords methods more friends users Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia macOS Docker Xiaomi Linux