Home > Net >  using the SSH key generated by ed25519 algorithm in git required password every time I pull or push
using the SSH key generated by ed25519 algorithm in git required password every time I pull or push

Time:07-14

I found that when using the SSH key which generated by ed25519 algorithm in github, I am required to input the password every time when pull or push;

but if I use the SSH key generated by rsa algorithm, everything is ok, not need password or ohther thing.

and I try in github and gitlab, I got the same situation:

the SSH key generated by ed25519 algorithm: What the hell are you? fill the password or go away!

the SSH key generated by rsa algorithm: Hello and welcome, I know who you are.

I set the config file in .ssh directory like:

config 1

and run ssh -T [email protected], I got:

enter image description here

and I change the config file to:

config 2

run ssh -T [email protected] again, I got:

enter image description here

its really confused me.

by the way, the first key is ed25519, the second is rsa.

CodePudding user response:

Are you on MacOS, linux or windows?

If on MacOS, you might need to add additional fields in your ~/.ssh/config

If so, add the try adding following lines below to save password in ssh-agent & os keychain.

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile /new/key/file

CodePudding user response:

When you make the ed25519 SSH key it gives you the option to enter the passphrase or says "empty for no passphrase". Its kind of like 2 factor authentication, it still requires a password just in case its a shared machine/account or you want that layer of security.

  • Related