✓ Solved

Invalid Key

I generated a new key pair standard RSA type. Copied key to instance. Checked login with verbosity and discovered at the key was consider invalid and a fallback password was prompted.

debug1: Server accepts key: exa.pub RSA SHA256:iEmLSoXZQ+yK/rGEqJ99l0mHep6QcJd7WeLty2EzMtc explicit
Load key "exa.pub": invalid format
debug1: Next authentication method: password

How can I correct this without being prompted for the password once the password has already be added to my keychain?

TIA

1 Reply

✓ Best Answer

Usually this happens when the permissions/ownership of $HOME/.ssh are wrong. You also need a file called $HOME/.ssh/authorized_keys containing all the public keys for all the systems where you want password-less login.

Here's what mine are:

  • $HOME/.ssh
drwxr-xr-x   3 stevewi  stevewi     7 Aug 16  2021 .ssh
  • $HOME/.ssh/*
-rw-r--r--  1 stevewi  stevewi  1232 Aug 16  2021 authorized_keys
-rw-------  1 stevewi  stevewi  1831 Aug 16  2021 id_rsa
-rw-r--r--  1 stevewi  stevewi   403 Aug 16  2021 id_rsa.pub
-rw-r--r--  1 stevewi  stevewi   581 Aug 16  2021 known_hosts

-- sw

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct