วันพฤหัสบดีที่ 27 ตุลาคม พ.ศ. 2554

แก้ปัญหา Failed to add the host to the list of known hosts ใน cygwin

บน cygwin เวลาเราจะ ssh ไปที่อื่นแล้วเกิด warning "Failed to add the host to the list of known hosts (/home/[username]/.ssh/known_hosts)." นั้นเนื่องมาจากใน windows เราไม่มี folder home อยู่แต่ home ของเราจะอยู่ที่ /cygdrive/c/Users/[username] แทนครับ

วิธีแก้ไข เราต้องไปแก้ไขไฟล์ที่บอก path ว่า home เราอยู่ที่ /cygdrive/c/Users/[username] โดยให้ไปแก้ไขที่ไฟล์

C:\path\to\cygwin\etc\passwd


โดยเปลี่ยน text ภายในไฟล์จาก /home/[username] เป็น /cygdrive/c/Users/[username] แทน จากนั้นให้ลอง ssh ใหม่จะเห็นว่าสามารถ ssh ได้แล้วโดยไม่เตือน warning ดังกล่าว

ที่มา - http://ekawas.blogspot.com
Continue Reading...

Blogroll

About