Disable ssh client hostkey checking

user-pic
Vote 0 Votes

使用 ssh 連線時, 若目的主機沒有在 ~/.ssh/known_hosts 內,
會出現此訊息問你要不要連線,
Are you sure you want to continue connecting (yes/no)?
yes 則會把 host key 加到 ~/.ssh/known_hosts

若不想出現此詢問訊息, 希望自動把 host key 加到 ~/.ssh/known_hosts
在 /etc/ssh/ssh_config 加入
StrictHostKeyChecking no
預設值是 ask

單次可以用 ssh -o "StrictHostKeyChecking no"

About this Entry

This page contains a single entry by Pank published on July 8, 2010 1:52 PM.

pingtest was the previous entry in this blog.

Unlocker 64 bit version is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives