Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to an Ubuntu instance fails #84

Open
snay2 opened this issue Jul 21, 2022 · 1 comment
Open

Connecting to an Ubuntu instance fails #84

snay2 opened this issue Jul 21, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@snay2
Copy link
Contributor

snay2 commented Jul 21, 2022

Describe the bug
When using simple-ec2 connect to log in to an EC2 instance using an AMI that is not a flavor of Amazon Linux, user encounters an SSH error "Permission denied (publickey)". This is because our EC2 Instance Connect helper code hardcodes the username of ec2-user, which is not correct for Ubuntu. The username in that case should be ubuntu. Red Hat and SUSE instances also fail to connect, but I'm not sure if they are because of the username or something else.

Steps to reproduce

  1. Launch an instance with any configuration and an Ubuntu AMI, using simple-ec2 launch
  2. Attempt to connect to that instance with simple-ec2 connect

Expected outcome
simple-ec2 connect should open an SSH connection and present the user with a shell to the instance. These steps work correctly for instances based on an Amazon Linux AMI.

Application Logs

Connecting to instance failed: exit status 255Warning: Permanently added 'ec2-3-143-5-51.us-east-2.compute.amazonaws.com' (ED25519) to the list of known hosts.
[email protected]: Permission denied (publickey).

Environment

  • App Version: 0.8.2
  • OS/Arch: macOS 12.4
@snay2 snay2 added the bug Something isn't working label Jul 21, 2022
@fddayan
Copy link

fddayan commented Jan 25, 2023

please fix this ! +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants