ssh-username and password are the one which we create right ?
I am using hcl code:
This is my user-data file:
#cloud-config
autoinstall:
    version: 1
    early-commands:
        # workaround to stop ssh for packer as it thinks it timed out
        - sudo systemctl stop ssh
    locale: en_US
    keyboard:
        layout: en
        variant: us
    packages: [open-vm-tools, openssh-server, net-tools, perl, open-iscsi,
ntp, curl, vim, ifupdown, zip, unzip, gnupg2, software-properties-common,
apt-transport-https, ca-certificates, lsb-release, python3-pip, jq, openvpn]
    network:
        network:
            version: 2
            ethernets:
                ens192:
                    dhcp4: true
    identity:
        hostname: ubuntu-server
        username: ubuntu
        password: test12345
    ssh:
        install-server: yes
        allow-pw: yes
        authorized-keys:
            - ssh-rsa <public key>
    storage:
        layout:
            name: lvm
    user-data:
        disable_root: false
    late-commands:
        - echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >
/target/etc/sudoers.d/ubuntu
        - curtin in-target --target=/target -- chmod 440
/etc/sudoers.d/ubuntu
        - apt update -y
        - apt install cloud-init -y
        - apt install openssh-server -y
        - apt install nfs-common nfs-kernel-server -y
        - cat <<EOF > /etc/resolv.conf
        nameserver <nameserver ip>
        EOF
        - apt install iputils-ping open-vm-tools openssh-server net-tools
perl open-iscsi ntp curl vim ifupdown zip unzip gnupg2
software-properties-common apt-transport-https ca-certificates lsb-release
python3-pip jq openvpn -y
        - service vmtoolsd restart

On Tue, Oct 4, 2022 at 1:06 AM Pravin Kumar <[email protected]>
wrote:

> Please check the ssh user and password as it is not able to authenticate
> the user, meanwhile you can share the json file content here
>
> On Tuesday, October 4, 2022 at 7:26:30 AM UTC+5:30 [email protected]
> wrote:
>
>> Hi Team,
>>
>> Can anyone help me with the issue with hcpacker:
>>
>> ==> vsphere-iso.linux-ubuntu-server: Waiting for SSH to become
>> available...
>> ==> vsphere-iso.linux-ubuntu-server: 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], no supported methods remain
>> ==> vsphere-iso.linux-ubuntu-server: 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], no
>> supported methods remain
>> ==> vsphere-iso.linux-ubuntu-server: Step "StepConnect" failed
>>
>> Regards,
>> Sonali
>>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/hashicorp/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Packer" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/packer-tool/o7TfwsWLcuo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/packer-tool/71d45d02-54ee-4b11-a0c7-1d495af50529n%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/71d45d02-54ee-4b11-a0c7-1d495af50529n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CAMHSVAikhR2W5XDtDDfgL6uvOOLGH1rRWTVinc6hERgvpVh6Qw%40mail.gmail.com.

Reply via email to