ปัญหา Login Secure Shell ช้า

6 Sep 2015,
Share: 

เคยไหมเวลา login เข้า Secure Shell แล้ว ช้า สาเหตุเกิดจาก ค่า config default ของ sshd เมื่อมีการ login เข้ามาระบบจะพยายามแปลง ip address เป็นชื่อ host name โดยไปถามจาก DNS Server (reverse hostname lookup) ถ้าเครื่อง ไม่สามารถติดต่อ DNS Server ได้ จะทําให้ ตอน login จะค้างไปซักพัก

วิธีแก้ปัญหา login Secure Shell ช้า

วิธีแก้ปัญหา login Secure Shell ช้า คือ แก้ไขไฟล์ config นี้ “/etc/ssh/sshd_config” ด้วยคําสั่ง

sudo nano /etc/ssh/sshd_config

เพิ่มคําสั่งนี้เข้าไปตรงบรรทัดสุดท้ายครับ “UseDNS no”เพื่อปิดการตรวจสอบ DNS เมื่อแก้ไขเสร็จก็ Save และ Restart sshd ด้วยคําสั่ง

sudo service sshd restart

เสร็จเรียบร้อยครับ :)


Copyright © 2019 - 2025 thiti.dev |  v1.59.0 |  Privacy policy | 

Build with ❤️ and Astro.

Github profile   Linkedin profile   Instagram   X profile   Nostr   Youtube channel   Telegram   Email contact   วงแหวนเว็บ