I am using the AWS Code build for creating Golden-ami using packer. We have a Windows bastion host for connecting private Ec2 Linux instances in AWS VPC. So my packer needs to connect EC2 in the private subnet via windows bastion host. Bastion host is in public subnet.
I am getting the below SSH timed out error when i am running the pipeline.
“associate_public_ip_address”: “true”,
“vpc_id”: “",
“subnet_id”: "”,
“security_group_id”: “sg-",
“ssh_interface”: “private_ip”,
“communicator”: “ssh”,
“ssh_bastion_username”: "",
“ssh_bastion_password”: "",
“ssh_bastion_host”:"**********”,
“ssh_bastion_port”:“3389”,
“ssh_bastion_agent_auth”: “true”
2021/01/20 20:37:09 packer: 2021/01/20 20:37:09 [INFO] Not using winrm communicator, skipping get password…
2021/01/20 20:37:09 packer: 2021/01/20 20:37:09 [INFO] Waiting for SSH, up to timeout: 5m0s
==> AWS AMI Builder - CIS: Pausing after run of step ‘StepRunSourceInstance’. Press enter to continue. ==> AWS AMI Builder - CIS: Pausing after run of step ‘StepGetPassword’. Press enter to continue. ==> AWS AMI Builder - CIS: Using ssh communicator to connect: 10.112.14.196
2021/01/20 20:37:09 ui error: ==> AWS AMI Builder - CIS: Error waiting for SSH: Error configuring bastion: SSH_AUTH_SOCK is not set
==> AWS AMI Builder - CIS: Waiting for SSH to become available…
==> AWS AMI Builder - CIS: Error waiting for SSH: Error configuring bastion: SSH_AUTH_SOCK is not set
==> AWS AMI Builder - CIS: Pausing before cleanup of step ‘StepGetPassword’. Press enter to continue. ==> AWS AMI Builder - CIS: Pausing before cleanup of step ‘StepRunSourceInstance’. Press enter to continue. ==> AWS AMI Builder - CIS: Terminating the source AWS instance…