Jenkins launch method 配置為 via SSH 啟動 Slave Node 時報 Host key verification failed
阿新 • • 發佈:2021-08-20
環境:
Master Node:Linux
Slave Node:Zynq 板卡一塊(已打包 java 到 image)
配置:
Slave Node 如下,
問題:
配置後,launch slave 發生錯誤:
...
Host key verification failed
...
這是因為板卡的認證資訊沒有加入到 Master Node 的 know_hosts 中。
解決:
首先,刪除錯誤的板卡 RSA 資訊 (如果有的話),
$ ssh-keygen -f "/home/rescure/.ssh/known_hosts" -R 192.168.2.10 # 最後的 ip 為板卡 ip
然後重新使用 ssh 連線板卡,輸入正確的使用者名稱和密碼後,對應此板卡的正確的 RSA 資訊將被重新寫入檔案 ~/.ssh/known_hosts
$ ssh root@192.168.2.10 The authenticity of host '192.168.2.10 (192.168.2.10)' can't be established. RSA key fingerprint is SHA256:hoQHxL2690JLv0LCqfmpyamxAlAwVe54Ss9na1vMqXE. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added'192.168.2.10' (RSA) to the list of known hosts. root@192.168.2.10's password: root@ps_hello_zynq:~#
重新在 Jenkins 頁面 launch slave node,即可建立成功。
(完)