วิธีไม่ให้ connection ของ ssh หลุดเมื่อ timeout


  1. ตั้งใน config ที่ไฟล์ ~/.ssh/config
  2. ใส่ค่าดังนี้
Host *
    ServerAliveInterval 60
    ServerAliveCountMax 3
    TCPKeepAlive yes
  1. save file หลังจากนั้น ssh ที่เชื่อมต่อใหม่ก็จะนำค่านี้ไปใช้งาน