
ในบทความนี้ ผมจะมาแสดงขั้นตอน วิธีการคอนฟิก SSH Server บน Cisco Switch / Router รวมถึง ASA Firewall ได้ด้วยครับ
การใช้ SSH ในการเข้าไปจัดการกับอุปกรณ์จะให้ความปลอดภัยที่สูงกว่าการใช้งาน Telnet เนื่องจาก SSH จะทำการ Encrypt ข้อมูลที่ส่งหากันระหว่าง เครื่องคอมพิวเตอร์ที่ใช้คอนฟิก กับ อุปกรณ์ Network ของเรา หากมี Hacker แอบดักจับข้อมูลของเรา ไปก็ไม่ต้องห่วงเรื่องความปลอดภัย เพราะเขาไม่สามารถแกะ Packet ออกมาอ่านได้ง่ายๆ อย่างแน่นอน ซึ่งตัว SSH ใช้ อัลกอริทึม เข้ารหัส RSA ซึ่งเป็นตัวเข้ารหัสที่แข็งแกร่งที่สุดในโลก (ในตอนนี้ 2019) สำหรับองกรณ์ ที่ต้องการความปลอดภัยสูง แนะนำให้ใช้ SSH ในการ จัดการอุปกรณ์เลยครับ ขั้นตอนการคอนฟิก มีดังนี้
1. Setup management IP
โดยปกติการออกแบบระบบ Network จะ กำหนด VLAN ไว้ หนึ่ง VLAN เพื่อเป็น IP Management ของอุปกรณ์ ซึ่งในบทความนี้ จะใช้เป็น VLAN 3 นะครับ
(config)# interface vlan 3
(config-if)# ip address 192.168.3.10 255.255.255.0

(config)# ip default-gateway 192.168.3.1

2. Set up hostname and domain-name
# config t
(config)# hostname SW2960-ISE-Lab
(config)# ip domain-name AbleNet.co.th

3.Generate the RSA Keys
SW2960-ISE-Lab(config)# crypto key generate rsa The name for the keys will be: myswitch.thegeekstuff.com Choose the size of the key modulus in the range of 360 to 2048 for your General Purpose Keys. Choosing a key modulus greater than 512 may take a few minutes. How many bits in the modulus [512]: 1024 % Generating 1024 bit RSA keys, keys will be non-exportable...[OK]

4. Setup the Line VTY configurations
# line vty 0 4
(config-line)# transport input ssh
(config-line)# login local
(config-line)# exit

5. สร้าง username password สำหรับใช้ Login
SW2960-ISE-Lab# config t
SW2960-ISE-Lab(config)# username admin privilege 15 secret admin123
6. Verify SSH access
SW2960-ISE-Lab#show ip ssh

REF: https://www.thegeekstuff.com/2013/08/enable-ssh-cisco