This issue was originally opened by @ffoysal as hashicorp/packer#10293. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
Created an AMI from source alpine AMI (alpine-ami-3.12.1-x86_64-r0). packer build was successful and produced the AMI. Can create an EC2 instance using the resultant AMI. But cannot ssh to the newly created EC2 instance using the same ssh-user, even though during the packer build the same user named alpine was successful. But ec2 instance created from source AMI (alpine-ami-3.12.1-x86_64-r0) can access it using the user named alpine
Reproduction Steps
packer build example.json
create ec2 instance using the newly produced AMI
try to do ssh ... alpine@<ec2-ip>
it will ask for password
ssh -i mykey.pem alpine@<ec2-ip>
alpine@'s password:
### Packer version
Packer v1.6.5
### Simplified Packer Buildfile
This issue was originally opened by @ffoysal as hashicorp/packer#10293. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
Created an AMI from source alpine AMI (
alpine-ami-3.12.1-x86_64-r0
).packer build
was successful and produced the AMI. Can create an EC2 instance using the resultant AMI. But cannot ssh to the newly created EC2 instance using the samessh-user
, even though during thepacker build
the same user namedalpine
was successful. But ec2 instance created from source AMI (alpine-ami-3.12.1-x86_64-r0
) can access it using the user namedalpine
Reproduction Steps
ssh ... alpine@<ec2-ip>
alpine@'s password:
{ "builders": [ { "type": "amazon-ebs", "profile": "default", "region": "us-east-2", "source_ami_filter": { "filters": { "virtualization-type": "hvm", "name": "alpine-ami-3.12.1-x86_64-r0", "root-device-type": "ebs" }, "owners": ["538276064493"], "most_recent": true }, "instance_type": "t2.micro", "ssh_username": "alpine", "ami_name": "packer-example {{timestamp}}" } ] }