SSH wont remeber my keys/passwords

Hi all,

I'm trying to configure ssh to manage my keys, however, I can't make the ssh-agent to remember my keys after opening a new terminal tab. I've seen other post asking the same question but without an answer (that posts was closed, so I'm starting a new one).

I've checked the following solutions and non of them are working:

  • Add AddKeysToAgent yes to ~.ssh/config [X]
  • Add if ! pgrep -u "$USER" ssh-agent > /dev/null; then ssh-agent > ~/.ssh-agent-thing fi if [[ "$SSH_AGENT_PID" == "" ]]; then eval "$(<~/.ssh-agent-thing)" fi to ~.bashrc [X]
  • Use systemd/user [X]

This is a mayor issue, specially if you use multiple identities. I would appreciate any help on this. Thanks

I need to withdraw my complains with KDE & Manjaro :slight_smile:

All the problem was that I was using (importing) a ~/.ssh/config file from an earlier OpenSSH version, and Manjaro 20 is coming with OpenSSH_8.2p1.

I'll keep this post, because it can help other people experimenting similar problems. Now my ~/.ssh/config looks like this:

AddKeysToAgent yes

Host myalias
    User myuser
    IdentityFile ~/.ssh/key1

  User otheruser
  IdentityFile ~/.ssh/key2

Host *
  User otheruser
  IdentityFile ~/.ssh/key3

And everything is working as expected.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by