Home > Article > Operation and Maintenance > How to bind an SSH key pair to one or more Linux instances
The content of this article is about how to bind an SSH key pair to one or more Linux instances. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you. help.
AttachKeyPair
Attach an SSH key pair to one or more Linux instances.
Description
When you use this interface, please note:
Windows instances do not support SSH key pairs.
After binding the SSH key pair, the username and password verification method will be disabled.
If the instance is in the Running state, the SSH key pair will take effect after restarting the instance (RebootInstance).
If the instance is in Stopped state, the SSH key pair will take effect after starting the instance (StartInstance).
If the instance has been bound to an SSH key pair, the new SSH key pair automatically replaces the original SSH key pair.
Request parameters
##Return parameters
are all public return parameters. See Public Parameters.Example
Request example
https://ecs.aliyuncs.com/?Action=AttachKeyPair &RegionId=cn-qingdao &KeyPairName=test &InstanceIds=["i-XXXXX"] &<公共请求参数>
Return example
XML format
<AttachKeyPairResponse> <RequestId>473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E</RequestId> </AttachKeyPairResponse>
JSON format
{ "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E" }
Error code
The following are error codes unique to this interface. For more error codes, please visit the API Error Center.The above is the detailed content of How to bind an SSH key pair to one or more Linux instances. For more information, please follow other related articles on the PHP Chinese website!