hashicorp / hashicorp/packer-plugin-amazon
cannot access the alpine ec2 instance created from resultant AMI
- Dominant language
- Go
- Stars
- 91
- Forks
- 141
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
_This issue was originally opened by @ffoysal as hashicorp/packer#10293. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). 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@`
- it will ask for password
```
ssh -i mykey.pem alpine@
alpine@'s password:
```
### Packer version
Packer v1.6.5
### Simplified Packer Buildfile
```
{
"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}}"
}
]
}
```
### Operating system and Environment details
Mac OS catalina 10.15.7
Contributor guide
Assessment
This issue has not been assessed yet.