SSH keeps asking for my passphrase












1















I would like to use two different services that use public key authentification, without having to always input my pass-phrase.



What I want:




  • to be able to type git pull without entering my login/password or my passphrase

  • to be able to type gcloud [...] ssh [...] without entering my passphrase each time.


As of today:





  • git pull does not ask me to enter my credentials, they are stored inside ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.


  • gcloud ... ssh ... always ask me to enter my passphrase:



$ gcloud ... ssh ...



sign_and_send_pubkey: signing failed: agent refused operation



Enter passphrase for key '/home/BeChillerToo/.ssh/google':




This is the content of my ~/.ssh/config:



IdentityFile ~/.ssh/google
IdentityFile ~/.ssh/id_rsa


And the content of /etc/ssh/ssh_config:



Host *
PasswordAuthentication yes
SendEnv LANG LC_*
HashKnownHosts yes
GSSAPIAuthentication yes




EDIT:
My keys seem to be badly added.



Here's the result of ssh-add -l after I boot:



2048 SHA256:+nCvs...CUM+DHqA4 chill@laptop (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)


And then after I add the google-compute-engine key:



2048 SHA256:+nCvs...CUM+DHqA4 /home/chill/.ssh/google_compute_engine (RSA)
4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)


The key related to chill@work-mail.com is the one I use for Github, hence why I don't have to provide credentials to git pull.



And I suspect that the first key (the one that switches from chill@laptop to /home/chill/.ssh/google_compute_engine) is the one causing the problem with gcloud:



$ gcloud compute ... ssh ...

sign_and_send_pubkey: signing failed: agent refused operation
Enter passphrase for key '/home/chill/.ssh/google_compute_engine':









share|improve this question





























    1















    I would like to use two different services that use public key authentification, without having to always input my pass-phrase.



    What I want:




    • to be able to type git pull without entering my login/password or my passphrase

    • to be able to type gcloud [...] ssh [...] without entering my passphrase each time.


    As of today:





    • git pull does not ask me to enter my credentials, they are stored inside ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.


    • gcloud ... ssh ... always ask me to enter my passphrase:



    $ gcloud ... ssh ...



    sign_and_send_pubkey: signing failed: agent refused operation



    Enter passphrase for key '/home/BeChillerToo/.ssh/google':




    This is the content of my ~/.ssh/config:



    IdentityFile ~/.ssh/google
    IdentityFile ~/.ssh/id_rsa


    And the content of /etc/ssh/ssh_config:



    Host *
    PasswordAuthentication yes
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes




    EDIT:
    My keys seem to be badly added.



    Here's the result of ssh-add -l after I boot:



    2048 SHA256:+nCvs...CUM+DHqA4 chill@laptop (RSA)
    4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
    4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)


    And then after I add the google-compute-engine key:



    2048 SHA256:+nCvs...CUM+DHqA4 /home/chill/.ssh/google_compute_engine (RSA)
    4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
    4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)


    The key related to chill@work-mail.com is the one I use for Github, hence why I don't have to provide credentials to git pull.



    And I suspect that the first key (the one that switches from chill@laptop to /home/chill/.ssh/google_compute_engine) is the one causing the problem with gcloud:



    $ gcloud compute ... ssh ...

    sign_and_send_pubkey: signing failed: agent refused operation
    Enter passphrase for key '/home/chill/.ssh/google_compute_engine':









    share|improve this question



























      1












      1








      1








      I would like to use two different services that use public key authentification, without having to always input my pass-phrase.



      What I want:




      • to be able to type git pull without entering my login/password or my passphrase

      • to be able to type gcloud [...] ssh [...] without entering my passphrase each time.


      As of today:





      • git pull does not ask me to enter my credentials, they are stored inside ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.


      • gcloud ... ssh ... always ask me to enter my passphrase:



      $ gcloud ... ssh ...



      sign_and_send_pubkey: signing failed: agent refused operation



      Enter passphrase for key '/home/BeChillerToo/.ssh/google':




      This is the content of my ~/.ssh/config:



      IdentityFile ~/.ssh/google
      IdentityFile ~/.ssh/id_rsa


      And the content of /etc/ssh/ssh_config:



      Host *
      PasswordAuthentication yes
      SendEnv LANG LC_*
      HashKnownHosts yes
      GSSAPIAuthentication yes




      EDIT:
      My keys seem to be badly added.



      Here's the result of ssh-add -l after I boot:



      2048 SHA256:+nCvs...CUM+DHqA4 chill@laptop (RSA)
      4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
      4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)


      And then after I add the google-compute-engine key:



      2048 SHA256:+nCvs...CUM+DHqA4 /home/chill/.ssh/google_compute_engine (RSA)
      4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
      4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)


      The key related to chill@work-mail.com is the one I use for Github, hence why I don't have to provide credentials to git pull.



      And I suspect that the first key (the one that switches from chill@laptop to /home/chill/.ssh/google_compute_engine) is the one causing the problem with gcloud:



      $ gcloud compute ... ssh ...

      sign_and_send_pubkey: signing failed: agent refused operation
      Enter passphrase for key '/home/chill/.ssh/google_compute_engine':









      share|improve this question
















      I would like to use two different services that use public key authentification, without having to always input my pass-phrase.



      What I want:




      • to be able to type git pull without entering my login/password or my passphrase

      • to be able to type gcloud [...] ssh [...] without entering my passphrase each time.


      As of today:





      • git pull does not ask me to enter my credentials, they are stored inside ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub.


      • gcloud ... ssh ... always ask me to enter my passphrase:



      $ gcloud ... ssh ...



      sign_and_send_pubkey: signing failed: agent refused operation



      Enter passphrase for key '/home/BeChillerToo/.ssh/google':




      This is the content of my ~/.ssh/config:



      IdentityFile ~/.ssh/google
      IdentityFile ~/.ssh/id_rsa


      And the content of /etc/ssh/ssh_config:



      Host *
      PasswordAuthentication yes
      SendEnv LANG LC_*
      HashKnownHosts yes
      GSSAPIAuthentication yes




      EDIT:
      My keys seem to be badly added.



      Here's the result of ssh-add -l after I boot:



      2048 SHA256:+nCvs...CUM+DHqA4 chill@laptop (RSA)
      4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
      4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)


      And then after I add the google-compute-engine key:



      2048 SHA256:+nCvs...CUM+DHqA4 /home/chill/.ssh/google_compute_engine (RSA)
      4096 SHA256:bTgKQM...ok chill@gmail.com (RSA)
      4096 SHA256:92d3Wy...jc chill@work-mail.com (RSA)


      The key related to chill@work-mail.com is the one I use for Github, hence why I don't have to provide credentials to git pull.



      And I suspect that the first key (the one that switches from chill@laptop to /home/chill/.ssh/google_compute_engine) is the one causing the problem with gcloud:



      $ gcloud compute ... ssh ...

      sign_and_send_pubkey: signing failed: agent refused operation
      Enter passphrase for key '/home/chill/.ssh/google_compute_engine':






      ssh






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 17 at 16:49







      Be Chiller Too

















      asked Jan 17 at 13:03









      Be Chiller TooBe Chiller Too

      165




      165






















          1 Answer
          1






          active

          oldest

          votes


















          2














          Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:



          $ eval $(ssh-agent)

          ## The output without the eval will look like this:
          $ ssh-agent
          ssh-agent
          SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
          SSH_AGENT_PID=125895; export SSH_AGENT_PID;
          echo Agent pid 125895;


          After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add



          $ ssh-add ~/.ssh/google
          $ ssh-add ~/.ssh/id_rsa


          With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:



          ## ~/.ssh/config
          AddKeysToAgent yes


          This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.



          Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.






          share|improve this answer





















          • 1





            Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.

            – Be Chiller Too
            Jan 17 at 16:33











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110546%2fssh-keeps-asking-for-my-passphrase%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:



          $ eval $(ssh-agent)

          ## The output without the eval will look like this:
          $ ssh-agent
          ssh-agent
          SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
          SSH_AGENT_PID=125895; export SSH_AGENT_PID;
          echo Agent pid 125895;


          After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add



          $ ssh-add ~/.ssh/google
          $ ssh-add ~/.ssh/id_rsa


          With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:



          ## ~/.ssh/config
          AddKeysToAgent yes


          This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.



          Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.






          share|improve this answer





















          • 1





            Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.

            – Be Chiller Too
            Jan 17 at 16:33
















          2














          Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:



          $ eval $(ssh-agent)

          ## The output without the eval will look like this:
          $ ssh-agent
          ssh-agent
          SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
          SSH_AGENT_PID=125895; export SSH_AGENT_PID;
          echo Agent pid 125895;


          After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add



          $ ssh-add ~/.ssh/google
          $ ssh-add ~/.ssh/id_rsa


          With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:



          ## ~/.ssh/config
          AddKeysToAgent yes


          This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.



          Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.






          share|improve this answer





















          • 1





            Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.

            – Be Chiller Too
            Jan 17 at 16:33














          2












          2








          2







          Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:



          $ eval $(ssh-agent)

          ## The output without the eval will look like this:
          $ ssh-agent
          ssh-agent
          SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
          SSH_AGENT_PID=125895; export SSH_AGENT_PID;
          echo Agent pid 125895;


          After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add



          $ ssh-add ~/.ssh/google
          $ ssh-add ~/.ssh/id_rsa


          With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:



          ## ~/.ssh/config
          AddKeysToAgent yes


          This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.



          Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.






          share|improve this answer















          Use ssh-agent. In a X environment GNOME keyring or KDE wallet can handle the keys automatically. In the console environment start the ssh-agent like this:



          $ eval $(ssh-agent)

          ## The output without the eval will look like this:
          $ ssh-agent
          ssh-agent
          SSH_AUTH_SOCK=/tmp/ssh-hvcwJQnSOHOi/agent.125894; export SSH_AUTH_SOCK;
          SSH_AGENT_PID=125895; export SSH_AGENT_PID;
          echo Agent pid 125895;


          After the ssh-agent is started (with the eval). You can add SSH keys with ssh-add



          $ ssh-add ~/.ssh/google
          $ ssh-add ~/.ssh/id_rsa


          With current versions of SSH you can also add the option AddKeysToAgent to the ~/.ssh/config file:



          ## ~/.ssh/config
          AddKeysToAgent yes


          This will automatically add the keys to the agent, if the environment variables SSH_AUTH_SOCK and SSH_AGENT_PID are set.



          Also check this post for the sign_and_send_pubkey: signing failed: agent refused operation error.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 days ago

























          answered Jan 17 at 15:11









          Simon SudlerSimon Sudler

          1,471314




          1,471314








          • 1





            Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.

            – Be Chiller Too
            Jan 17 at 16:33














          • 1





            Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.

            – Be Chiller Too
            Jan 17 at 16:33








          1




          1





          Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.

          – Be Chiller Too
          Jan 17 at 16:33





          Thanks for your anwser! Unfortunately, these settings seem to reset everytime I reboot my computer... I edited my question to add more information.

          – Be Chiller Too
          Jan 17 at 16:33


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110546%2fssh-keeps-asking-for-my-passphrase%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Category:香港粉麵

          List *all* the tuples!

          Channel [V]