简体   繁体   English

等待 SSH 时出错:Packer 遇到身份验证错误:使用 vsphere-iso

[英]Error waiting for SSH: Packer experienced an authentication error : using vsphere-iso

getting below error while running packer using vsphere-iso builder.使用 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

config.json配置文件

    "communicator": "ssh",
    "ssh_username": "{{user `ssh_username`}}",
    "ssh_password": "{{user `ssh_password`}}",
    "ssh_timeout": "30m",

username and password is coming from Jenkins at run time.用户名和密码在运行时来自 Jenkins。 same has beed updated in autounattend.xml , if i hard-code the credential in config.json file then its working fine.autounattend.xml中也进行了同样的更新,如果我在 config.json 文件中对凭证进行硬编码,那么它可以正常工作。 dont know what's the issue不知道是什么问题

packer debug log打包程序调试日志

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-

I got the solution as below我得到了如下解决方案

In autounattend.xml file password was given as plain text true , which needs to be change to false.autounattend.xml文件中,密码以纯文本形式给出 true ,需要将其更改为 false。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM