pullpreview / action

A GitHub Action that starts preview deployments for your pull requests and branches. It can work with any application that has a valid Docker Compose file.

Home Page:https://pullpreview.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to SSH in using ec2-user@[ip] with Lightsail Private Key

geoffatsource opened this issue · comments

I am getting permission denied errors trying to SSH in via local terminal. Also, I'm a bit confused how the authorized Github users config works when SSHing in.

⚙️ Starting SSH session
⚙️ Remote server: SSH-2.0-OpenSSH_8.7
⚙️ Agreed KEX algorithm: ecdh-sha2-nistp256
⚙️ Agreed Host Key algorithm: ecdsa-sha2-nistp256
⚙️ Agreed server-to-client cipher: aes128-ctr MAC: hmac-sha2-256
⚙️ Agreed client-to-server cipher: aes128-ctr MAC: hmac-sha2-256
⚙️ Agreed client-to-server compression: none
⚙️ Agreed server-to-client compression: none
⚙️ Handshake finished
👤 Checking host key: 79:df:35:3e:10:09:6e:bd:6e:74:69:d5:81:d8:37:d6
❗ Host "54.188.11.123":"22" is unknown
👤 Connection to "54.188.11.123":"22" accepted
👤 Authenticating to "54.188.11.123":"22" as "ec2-user"
⚙️ Available client authentication methods: publickey,password,keyboard-interactive
⚙️ Authentication that can continue: gssapi-with-mic,publickey
👤 Authenticating using publickey method
❗ Authentication failed (publickey)
⚙️ Partial success: no
⚙️ Authentication that can continue: gssapi-with-mic,publickey
😨 No more authentication methods to try

SSH authentication works by downloading the public keys of the admins GitHub users onto the instance. For instance my key(s) would be the one(s) at https://github.com/crohr.keys

So you need to make sure you have the corresponding private key locally, and that it is used when issuing the SSH command.

Also for debugging make sure you add your GitHub username to the admins array.

I see! I didn't realize that was a Githug feature. Might be useful in your docs to point to the Github docs on that, especially since Lightsail has their own key