> For the complete documentation index, see [llms.txt](https://docs-epc.gitbook.io/ncs-documents/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-epc.gitbook.io/ncs-documents/compute/compute-instance/ssh-to-linux-compute-instance/converting-key-pair-for-putty.md).

# Converting Key Pair for PuTTy

ในปัจจุบัน software ที่ใช้ในการ SSH (Secure Shell) หา Compute Instance ในกลุ่ม OS Linux นั้น ไม่รองรับ key pair ที่เป็นสกุล .pem แล้ว จึงจำเป็นจะต้องแปลง .pem key pair ให้กลายเป็น .ppk key pair ก่อนนำไปใช้งาน

## Prerequisite

* มีไฟล์ private key ที่ได้จาก key pair หากไม่มี ศึกษาได้จาก [ขั้นตอนในการสร้าง key pair](/ncs-documents/compute/key-pair/managing-key-pair-s.md)
* ติดตั้ง program PuTTyGen ที่ได้มาพร้อมกับการติดตั้ง PuTTy

## Instructions

### 1. เปิดโปรแกรม PuTTyGen

เปิดโปรแกรม PuTTyGen ที่ได้มาพร้อมกับการติดตั้ง PuTTy โดยค้นหาที่ menu Start ของ Windows ว่า "PuTTyGen"&#x20;

<figure><img src="/files/8wrBlmeLxxB3TSBgl878" alt=""><figcaption><p>PuTTyGen UI</p></figcaption></figure>

### 2. เลือก .pem Key Pair ที่ต้องการ

คลิกปุ่ม 'Load' เพื่อเปิด menu browse จากนั้น เลือกนามสกุลไฟล์เป็น All Files (\*.\*) และเลือก .pem key pair ที่ต้องการ convert

<figure><img src="/files/lV5uIu0ZycS4u3mF0uHE" alt=""><figcaption><p>Select a .pem Key Pair</p></figcaption></figure>

### 3. Convert และ save file private key

หลังจาก load .pem file มาแล้ว จะแสดงรายละเอียดของ key pair ดังนี้

<figure><img src="/files/WEYuFbFhguWI1uIOjO5R" alt=""><figcaption><p>.pem Key Pair Loaded</p></figcaption></figure>

ก่อน save private key ที่เป็น .ppk สามารถใส่ passphase เพื่อเพิ่มความปลอดภัยของ private key ได้ และเมื่อพอใจแล้วก็ให้กด save private key

<figure><img src="/files/v10jD2nhoX4AVKGJO9ZJ" alt=""><figcaption><p>Save .ppk Private Key</p></figcaption></figure>

เท่านี้ .ppk ที่ใช้ในการ auth บน PuTTy ก็พร้อมใช้งานแล้ว ([ดูวิธีการใช้งาน](https://docs-epc.gitbook.io/ncs-documents/compute/compute-instance/ssh-to-linux-compute-instance/pages/7EB59vdA5c2AomOYHPFl#6.-key-pair-authentication))


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs-epc.gitbook.io/ncs-documents/compute/compute-instance/ssh-to-linux-compute-instance/converting-key-pair-for-putty.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
