forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: zhoumeng <zhoumeng35@huawei.com> Co-committed-by: zhoumeng <zhoumeng35@huawei.com>
32 lines
6.9 KiB
HTML
32 lines
6.9 KiB
HTML
<a name="EN-US_TOPIC_0031107266"></a><a name="EN-US_TOPIC_0031107266"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining the Password for Logging In to a Windows <span id="text1595553075814">ECS</span></h1>
|
|
<div id="body1464342274212"><div class="section" id="EN-US_TOPIC_0031107266__section83915017466"><h4 class="sectiontitle">Scenarios</h4><p id="EN-US_TOPIC_0031107266__p5548482995849">Password authentication is required to log in to a Windows <span id="EN-US_TOPIC_0031107266__text2418174235815">ECS</span>. You must use the key file used when you created the <span id="EN-US_TOPIC_0031107266__text9971154710587">ECS</span> to obtain the administrator password generated during <span id="EN-US_TOPIC_0031107266__text18984195862115">ECS</span> creation. The administrator user is <strong id="EN-US_TOPIC_0031107266__b2049513373585">Administrator</strong> or the user configured using Cloudbase-Init. This password is randomly generated, offering high security.</p>
|
|
<p id="EN-US_TOPIC_0031107266__p703221995027">You can obtain the initial password for logging in to a Windows <span id="EN-US_TOPIC_0031107266__text66814149599">ECS</span> through the management console or APIs. For details, see this section.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031107266__section38475220193847"><h4 class="sectiontitle">Obtaining the Password Through the Management Console</h4><ol id="EN-US_TOPIC_0031107266__ol5405292620557"><li id="EN-US_TOPIC_0031107266__li584178495530">Obtain the private key file (.pem file) used when you created the <span id="EN-US_TOPIC_0031107266__text136800010221">ECS</span>.</li><li id="EN-US_TOPIC_0031107266__li3490190117228">Log in to the management console.</li><li id="EN-US_TOPIC_0031107266__li464234814566">Click <span><img id="EN-US_TOPIC_0031107266__en-us_topic_0014250631_image1862675853202121" src="en-us_image_0210779229.png"></span> in the upper left corner and select your region and project.</li><li id="EN-US_TOPIC_0031107266__en-us_topic_0029320966_li40039532224047">Under <strong id="EN-US_TOPIC_0031107266__b1967518220919"><span id="EN-US_TOPIC_0031107266__text7675132211912">Computing</span></strong>, click <strong id="EN-US_TOPIC_0031107266__b176754221695">Elastic Cloud Server</strong>.</li><li id="EN-US_TOPIC_0031107266__en-us_topic_0029320966_li24833369224047">On the <strong id="EN-US_TOPIC_0031107266__b577318918018">Elastic Cloud Server</strong> page, select the target <span id="EN-US_TOPIC_0031107266__text11584529221">ECS</span>.</li><li id="EN-US_TOPIC_0031107266__li46427097215215">In the <strong id="EN-US_TOPIC_0031107266__b194135119">Operation</strong> column, click <strong id="EN-US_TOPIC_0031107266__b514283585">More</strong> and select <strong id="EN-US_TOPIC_0031107266__b1574177023">Get Password</strong>.<div class="fignone" id="EN-US_TOPIC_0031107266__fig1599613332547"><span class="figcap"><b>Figure 1 </b>Get Password</span><br><span><img id="EN-US_TOPIC_0031107266__image4997833195414" src="en-us_image_0000001659531420.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</li><li id="EN-US_TOPIC_0031107266__li50525424215555">Use either of the following methods to obtain the password through the key file:<ul id="EN-US_TOPIC_0031107266__ul6527186921565"><li id="EN-US_TOPIC_0031107266__li1887355017131">Click <strong id="EN-US_TOPIC_0031107266__b842352706144939">Select File</strong> and upload the key file from a local directory.</li><li id="EN-US_TOPIC_0031107266__li42486460215639">Copy the key file content to the text field.</li></ul>
|
|
</li><li id="EN-US_TOPIC_0031107266__li18672759215816">Click <strong id="EN-US_TOPIC_0031107266__b102668266317244">Get Password</strong> to obtain a random password.</li></ol>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031107266__section1118765310423"><h4 class="sectiontitle">Obtaining the Password Through APIs</h4><ol id="EN-US_TOPIC_0031107266__ol507546510433"><li id="EN-US_TOPIC_0031107266__li17213488101942">Obtain the private key file (.pem file) used when you created the <span id="EN-US_TOPIC_0031107266__text356411314017">ECS</span>.</li><li id="EN-US_TOPIC_0031107266__li1110886810299">Set up the API calling environment.</li><li id="EN-US_TOPIC_0031107266__li54866977184131">Call APIs. For details, see <a href="https://docs.otc.t-systems.com/api/ecs/en-us_topic_0020805967.html" target="_blank" rel="noopener noreferrer">API Usage Guidelines</a> in <em id="EN-US_TOPIC_0031107266__i84235269711913">Elastic Cloud Server API Reference</em>.</li><li id="EN-US_TOPIC_0031107266__li5770130102852"><a name="EN-US_TOPIC_0031107266__li5770130102852"></a><a name="li5770130102852"></a>Obtain the ciphertext password.<p id="EN-US_TOPIC_0031107266__p44462590102854"><a name="EN-US_TOPIC_0031107266__li5770130102852"></a><a name="li5770130102852"></a>Call the password obtaining APIs to obtain the ciphertext password of the public key encrypted using RSA. The API URI is in the format "GET /v2/{<em id="EN-US_TOPIC_0031107266__i842352697152819">tenant_id</em>}/servers/{<em id="EN-US_TOPIC_0031107266__i842352697152825">server_id</em>}/os-server-password".</p>
|
|
<div class="note" id="EN-US_TOPIC_0031107266__note58305696141012"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0031107266__p54989223141012">For details, see <a href="https://docs.otc.t-systems.com/api/ecs/en-us_topic_0031176553.html" target="_blank" rel="noopener noreferrer">Obtaining the Password for Logging In to an ECS</a>.</p>
|
|
</div></div>
|
|
</li><li id="EN-US_TOPIC_0031107266__li20331687102654">Decrypt the ciphertext password.<p id="EN-US_TOPIC_0031107266__p28094918102655"><a name="EN-US_TOPIC_0031107266__li20331687102654"></a><a name="li20331687102654"></a>Use the private key file used when you created the ECS to decrypt the ciphertext password obtained in step <a href="#EN-US_TOPIC_0031107266__li5770130102852">4</a>.</p>
|
|
<ol type="a" id="EN-US_TOPIC_0031107266__ol27402695153412"><li id="EN-US_TOPIC_0031107266__li45297668153412">Run the following command to convert the ciphertext password format to ".key -nocrypt" using OpenSSL:<p id="EN-US_TOPIC_0031107266__p60327754154216"><a name="EN-US_TOPIC_0031107266__li45297668153412"></a><a name="li45297668153412"></a><strong id="EN-US_TOPIC_0031107266__b46168377154226">openssl pkcs8 -topk8 -inform PEM -outform DER -in rsa_pem.key -out pkcs8_der.key -nocrypt</strong></p>
|
|
</li><li id="EN-US_TOPIC_0031107266__li50037454154235">Invoke the Java class library <strong id="EN-US_TOPIC_0031107266__b842352706165810">org.bouncycastle.jce.provider.BouncyCastleProvider</strong> and use the key file to edit the code decryption ciphertext.</li></ol>
|
|
</li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0000001234183498.html">Obtaining and Deleting the Password of a Windows ECS</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |