使用 vsphere-iso builder 運行打包程式時出現以下錯誤。
Error waiting for SSH: Packer experienced an authentication error when trying to connect via SSH. This can happen if your username/password are wrong. You may want to double-check your credentials as part of your debugging process. original error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password keyboard-interactive], no supported methods remain
組態檔
"communicator": "ssh",
"ssh_username": "{{user `ssh_username`}}",
"ssh_password": "{{user `ssh_password`}}",
"ssh_timeout": "30m",
用戶名和密碼在運行時來自 Jenkins。在autounattend.xml中也進行了同樣的更新,如果我在 config.json 檔案中對憑證進行硬編碼,那么它可以正常作業。不知道是什么問題
打包程式除錯日志
2022/05/09 10:16:20 packer.exe plugin: [DEBUG] Detected authentication error. Increasing handshake attempts.
2022/05/09 10:16:27 packer.exe plugin: [INFO] Attempting SSH connection to 172.16.112.59:22...
2022/05/09 10:16:27 packer.exe plugin: [DEBUG] reconnecting to TCP connection for SSH
2022/05/09 10:16:27 packer.exe plugin: [DEBUG] handshaking with SSH
2022/05/09 10:16:28 packer.exe plugin: [DEBUG] SSH handshake err: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none password keyboard-
uj5u.com熱心網友回復:
我得到了如下解決方案
在autounattend.xml檔案中,密碼以純文本形式給出 true ,需要將其更改為 false。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/476101.html
標籤:詹金斯 SSH 打包机 hashcorp-packer 打包机制造商
