หมายเหตุ: บทความปี 2008 สำหรับ PuTTY บน Symbian S60 (N95) ปัจจุบันไม่เกี่ยวข้องแล้ว (Symbian ตาย, N95 ไม่ได้ใช้) แต่หลักการสร้าง SSH Key และแปลงฟอร์แมตยังใช้ได้กับ Linux/Windows/macOS
หลักการ (ยังใช้ได้ทุก Platform)
- สร้าง Key Pair บน Server/Client (Linux/macOS/WSL):
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com" # Enter file: ~/.ssh/id_rsa_n95 (หรือชื่อที่ต้องการ) # Passphrase: ว่าง (ถ้าต้องการ login ไม่ต้องพิมพ์รหัส) หรือใส่รหัสผ่านเพื่อความปลอดภัย - คัดลอก Public Key ไป Server:
$ ssh-copy-id -i ~/.ssh/id_rsa_n95.pub user@server # หรือ manual: cat ~/.ssh/id_rsa_n95.pub | ssh user@server "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys" - แปลง Private Key เป็น PuTTY Format (.ppk):
$ puttygen ~/.ssh/id_rsa_n95 -o ~/.ssh/id_rsa_n95.ppk # Windows: ใช้ puttygen.exe → Load → Save private key - นำ .ppk ไปอุปกรณ์เป้าหมาย (N95/โทรศัพท์/USB)
- ตั้งค่า PuTTY: Connection → SSH → Auth → Private key file → Browse หา .ppk
ขั้นตอนเดิม (สำหรับ N95 Symbian - ไม่ใช้งานได้แล้ว)
- บน Linux:
ssh-keygen(Enter ทั้ง passphrase ว่าง) →cat id_rsa.pub > authorized_keys→chmod 644 authorized_keys - แปลง:
puttygen id_rsa -o id_rsa.ppk - คัดลอก
id_rsa.ppkไป N95 (Mass Storage Mode) - บน PuTTY N95: Options → Edit → General → ใส่ Host/User → Right toggle → Private Key → Browse หา
E:\temp\id_rsa.ppk - Back → Options → Connect
คำเตือนความปลอดภัย
- Passphrase ว่าง = ความเสี่ยงสูง หากโทรศัพท์หาย/โดนขโมย จะเข้า Server ได้ทันที
- แนะนำ: ใช้ Passphrase + SSH Agent / Pageant (Windows) / Keychain (Linux)
- ใช้ Ed25519 แทน RSA:
ssh-keygen -t ed25519(เร็วกว่า, ปลอดภัยกว่า, Key สั้นกว่า) - หมุน Key เป็นระยะ (Key Rotation)
PuTTY สมัยใหม่ (Windows)
PuTTY 0.75+ รองรับ OpenSSH Private Key Format โดยตรงแล้ว (ไม่ต้องแปลง .ppk) แต่ .ppk ยังใช้ได้