This error looks like in your bastion the ssh server didn't started 

the SSH_AUTH_SOCK environment variable is set to point to a unix-domain 
socket used for communicating with the agent, and 
the SSH_AGENT_PID environment variable is set to the process ID of the agent


*echo $SSH_AGENT_SOCK*
On Wednesday, January 20, 2021 at 11:08:38 PM UTC+1 [email protected] 
wrote:

> 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...
>

-- 
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/5aa5096b-b483-44b0-af20-861986189553n%40googlegroups.com.

Reply via email to