monday 8am and im locked out of a new ec2 instance

Solvedauthenticationlinuxssh89 replies · 1.7K views · started

Accepted solution

by Liv SilvaJump to the reply

oof in CI, private keys pasted as secrets often lose teh trailing newline or get CRLF line endings. make suree teh key file ends with a newline and has 600 permissions, or the client silently skips it.

  1. ok weird one my key works on every other server. on a new EC2 instance, from a CI job, nothing:

    A colleague set up teh account. they swear they pasted my key. I'm satrting to suspect the server, but I don't even know where to look.

    it's frustrating beacuse i can't see anything on the server side, and the error message is the same for every possible mistake, is there a way to get more detail from the client at least? seriously need help here 😭

    2
  2. in ssh -vvv, do you see Offering public key for teh key you expect, and what comes right after?

    2 0 helpful
  3. been there man pro tip: write down what u change. i didnt and had to redo linux from scratch :D exact same thing happened to my moms pc last month

    2 2 helpful
  4. ok so i swear ssh is cursed. which version are u on? any ideas??

    2 0 helpful
  5. for me it was teh default config... swapped it and boom, fixed. lol this thread is gold hope that helps :)

    31 0 helpful
  6. pro tip: write down what u change. i didnt and had to redo linux from scratch. reading this at 2am instead of sleeping, no regrets

    22 1 helpful
  7. @kenjir81 thank u this worked!!

    0 1 helpful
  8. yeahhh for me it was the settings. swapped it and boom, fixed worked for me anyway 🤷

    38 0 helpful
  9. wait is authentication even worth bothernig with or should i just leave it

    1 0 helpful
  10. yeahhh bump. still happening with authentication for me fingers crossed 🤞

    0 2 helpful
  11. Run the client in verbose mode first:

    ssh -vvv user@host
    

    look for Offering public key: lines :D if your key is never offered, teh client isnt using it: pass -i ~/.ssh/id_ed25519 or set IdentityFile in ~/.ssh/config. If its offered and rejected, the server side is the problem.

    0 13 helpful
  12. xD

    2 0 helpful
  13. oh ive been there lol this, sooo much this

    7 2 helpful
  14. pro tip: write down what u change... i didnt and had to redo linux from scratch... wait does this also apply to linux? hope that helps :)

    0 6 helpful

Reply to this topic

Sign in or create an account to reply.