We are trying to use packer latest version 1.9.1 or 1.8.x in our pipelines and running into below issue.Earlier it use to work with older packer version 1.6.x or 1.7.x.Any idea on this error we are using following settings
“builders”: [
{
“name”: “centos7”,
“type”: “amazon-ebs”,
“access_key”: “{{user aws_access_key
}}”,
“secret_key”: “{{user aws_secret_key
}}”,
“region”: “”,
“ami_regions”: [
“us-west-1”
],
“tags”: {
“supported”: “”
},
“source_ami_filter”: {
“filters”: {
“product-code”: “”
},
“owners”: [“aws-marketplace”],
“most_recent”: true
},
“instance_type”: “t2.small”,
“user_data_file”: “./tie-machine-imager/scripts/autobahn_config.sh”,
“ssh_bastion_host”: “our host”,
“ssh_bastion_port”: “22”,
“ssh_port”: “22”,
“ssh_timeout”: “3m”,
“ssh_bastion_username”: “”,
“ssh_bastion_agent_auth”: true,
“ssh_agent_auth”: true,
“ssh_username”: “”,
“ami_name”: " {{user ami_date
}}",
“vpc_id”:
“subnet_id”: “”,
“security_group_id”: “”
}
Error Output:-
2023/07/10 01:55:15 packer-builder-amazon-ebs plugin: [INFO] connecting with SSH to host :22 through bastion at :22
2023/07/10 01:55:16 packer-builder-amazon-ebs plugin: [DEBUG] TCP connection to SSH ip/port failed: Error connecting to bastion: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2023/07/10 01:55:21 packer-builder-amazon-ebs plugin: Using host value: