How to ssh-add elliptic curve key?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;







up vote
0
down vote

favorite












I'm trying to use a newly generated elliptic curve key with git version control for GitLab.



  • I am using a Xubuntu 16.04.

  • My OpenSSH version is: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016

Usually I would do:



ssh-add -D # to be sure no other identities are used than the one I add
ssh-add ~/.ssh/my-rsa-key
git add ...
git commit ...
git push ...


Then the key ring thing would again ask for the password of the key to store it for the session and I could push and pull without needing to add any key again or entering the password again.



However with elliptic curve keys it does not seem to work. First of all, I cannot ssh-add the key:



ssh-add ~/.ssh/id_ed25519
Enter passphrase for /home/user/.ssh/id_ed25519: # here I enter my password
Could not add identity "/home/user/.ssh/id_ed25519": communication with agent failed


However, when I did not remove all identities and did not use ssh-add <key> and cancelled entering a password for the key ring for other (rsa) keys, I was asked to enter the password for the elliptic curve key on command line and when I entered it there, I could push to or pull from my repository. The problem then is, that I have to enter my password on every interaction with gitlab and my repository. So I tried configuring my ~/ssh/config to not prompt for password all the time:



Host gitlab.com
User "user"
PreferredAuthentications publickey,password
IdentityFile /home/user/.ssh/id_ed25519
IdentitiesOnly yes
AddKeysToAgent yes


But that does not work either, it keeps nagging me about the password on every pull or push.



How can I add the keys like I do with RSA keys, so that I do not have to enter the password all the time?







share|improve this question



























    up vote
    0
    down vote

    favorite












    I'm trying to use a newly generated elliptic curve key with git version control for GitLab.



    • I am using a Xubuntu 16.04.

    • My OpenSSH version is: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016

    Usually I would do:



    ssh-add -D # to be sure no other identities are used than the one I add
    ssh-add ~/.ssh/my-rsa-key
    git add ...
    git commit ...
    git push ...


    Then the key ring thing would again ask for the password of the key to store it for the session and I could push and pull without needing to add any key again or entering the password again.



    However with elliptic curve keys it does not seem to work. First of all, I cannot ssh-add the key:



    ssh-add ~/.ssh/id_ed25519
    Enter passphrase for /home/user/.ssh/id_ed25519: # here I enter my password
    Could not add identity "/home/user/.ssh/id_ed25519": communication with agent failed


    However, when I did not remove all identities and did not use ssh-add <key> and cancelled entering a password for the key ring for other (rsa) keys, I was asked to enter the password for the elliptic curve key on command line and when I entered it there, I could push to or pull from my repository. The problem then is, that I have to enter my password on every interaction with gitlab and my repository. So I tried configuring my ~/ssh/config to not prompt for password all the time:



    Host gitlab.com
    User "user"
    PreferredAuthentications publickey,password
    IdentityFile /home/user/.ssh/id_ed25519
    IdentitiesOnly yes
    AddKeysToAgent yes


    But that does not work either, it keeps nagging me about the password on every pull or push.



    How can I add the keys like I do with RSA keys, so that I do not have to enter the password all the time?







    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'm trying to use a newly generated elliptic curve key with git version control for GitLab.



      • I am using a Xubuntu 16.04.

      • My OpenSSH version is: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016

      Usually I would do:



      ssh-add -D # to be sure no other identities are used than the one I add
      ssh-add ~/.ssh/my-rsa-key
      git add ...
      git commit ...
      git push ...


      Then the key ring thing would again ask for the password of the key to store it for the session and I could push and pull without needing to add any key again or entering the password again.



      However with elliptic curve keys it does not seem to work. First of all, I cannot ssh-add the key:



      ssh-add ~/.ssh/id_ed25519
      Enter passphrase for /home/user/.ssh/id_ed25519: # here I enter my password
      Could not add identity "/home/user/.ssh/id_ed25519": communication with agent failed


      However, when I did not remove all identities and did not use ssh-add <key> and cancelled entering a password for the key ring for other (rsa) keys, I was asked to enter the password for the elliptic curve key on command line and when I entered it there, I could push to or pull from my repository. The problem then is, that I have to enter my password on every interaction with gitlab and my repository. So I tried configuring my ~/ssh/config to not prompt for password all the time:



      Host gitlab.com
      User "user"
      PreferredAuthentications publickey,password
      IdentityFile /home/user/.ssh/id_ed25519
      IdentitiesOnly yes
      AddKeysToAgent yes


      But that does not work either, it keeps nagging me about the password on every pull or push.



      How can I add the keys like I do with RSA keys, so that I do not have to enter the password all the time?







      share|improve this question













      I'm trying to use a newly generated elliptic curve key with git version control for GitLab.



      • I am using a Xubuntu 16.04.

      • My OpenSSH version is: OpenSSH_7.2p2 Ubuntu-4ubuntu2.4, OpenSSL 1.0.2g 1 Mar 2016

      Usually I would do:



      ssh-add -D # to be sure no other identities are used than the one I add
      ssh-add ~/.ssh/my-rsa-key
      git add ...
      git commit ...
      git push ...


      Then the key ring thing would again ask for the password of the key to store it for the session and I could push and pull without needing to add any key again or entering the password again.



      However with elliptic curve keys it does not seem to work. First of all, I cannot ssh-add the key:



      ssh-add ~/.ssh/id_ed25519
      Enter passphrase for /home/user/.ssh/id_ed25519: # here I enter my password
      Could not add identity "/home/user/.ssh/id_ed25519": communication with agent failed


      However, when I did not remove all identities and did not use ssh-add <key> and cancelled entering a password for the key ring for other (rsa) keys, I was asked to enter the password for the elliptic curve key on command line and when I entered it there, I could push to or pull from my repository. The problem then is, that I have to enter my password on every interaction with gitlab and my repository. So I tried configuring my ~/ssh/config to not prompt for password all the time:



      Host gitlab.com
      User "user"
      PreferredAuthentications publickey,password
      IdentityFile /home/user/.ssh/id_ed25519
      IdentitiesOnly yes
      AddKeysToAgent yes


      But that does not work either, it keeps nagging me about the password on every pull or push.



      How can I add the keys like I do with RSA keys, so that I do not have to enter the password all the time?









      share|improve this question












      share|improve this question




      share|improve this question








      edited yesterday









      slm♦

      232k65479648




      232k65479648









      asked 2 days ago









      Zelphir

      1244




      1244

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460496%2fhow-to-ssh-add-elliptic-curve-key%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f460496%2fhow-to-ssh-add-elliptic-curve-key%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?