Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ซอฟต์แวร์ >> ซอฟต์แวร์

เปิดใช้งาน Public Key Authentication สำหรับ SSH บน Cisco SG300

เพิ่มความปลอดภัย SSH บน Cisco SG300 ด้วย Public Key Authentication แทน Username/Password เพียงอย่างเดียว สามารถรวมใช้ทั้งสองวิธีได้

1. เปิดใช้งาน SSH User Authentication by Public Key

Web GUI → Security → SSH Server → SSH User Authentication → ติก Enable SSH User Authentication by Public Key → Apply

2. สร้าง Key Pair ด้วย PuTTYgen

  1. เปิด PuTTYgen → Generate → เคลื่อนเมาส์จนครบ
  2. ตั้ง Passphrase (รหัสผ่านปลดล็อก Key) → Save public key และ Save private key (.ppk) → เก็บไว้ที่ปลอดภัย (แนะนำ VeraCrypt)

3. เพิ่ม User และ Public Key ใน Switch

Administration → User Accounts (ดู User ที่มีอยู่) → กลับไป SSH User Authentication → Add SSH User

  • User เดียวกับ Admin: ติก Automatic Login → Login ครั้งเดียวด้วย Passphrase ของ Private Key
  • User ต่างจาก Admin: ไม่ติก Automatic Login → Login 2 ครั้ง (Key แล้วค่อย User/Pass ปกติ) → ปลอดภัยกว่า

Key Type: RSA → วาง Public Key ที่คัดลอกมาจากไฟล์ .pub → Apply

4. Login ด้วย Private Key ใน PuTTY

  1. PuTTY → Host Name: IP Switch → Connection → SSH → Auth → Browse เลือก Private Key (.ppk)
  2. Open → Login as: User ที่เพิ่งสร้าง → ใส่ Passphrase
  3. หากเปิด Automatic Login จะเข้าสู่ CLI ทันทีหลังใส่ Passphrase