User being prompted for sudo password after sshSSH Pub Key Login without Passwordssh and run script on remote...

What verb for taking advantage fits in "I don't want to ________ on the friendship"?

Does it make sense to (partially) create a conlang that you don't intend to actually use in the story?

Does "boire un jus" tend to mean "coffee" or "juice of fruit"?

Fully submerged water bath for stove top baking?

A quine of sorts

Did the Russian Empire have a claim to Sweden? Was there ever a time where they could have pursued it?

What was the first science fiction or fantasy multiple choice book?

Reusable spacecraft: why still have fairings detach, instead of open/close?

Do electrons really perform instantaneous quantum leaps?

I agreed to cancel a long-planned vacation (with travel costs) due to project deadlines, but now the timeline has all changed again

Why wasn't ASCII designed with a contiguous alphanumeric character order?

Rear derailleur got caught in the spokes, what could be a root cause

Where can I find my serialized Sitecore items?

How do I keep a running total of data in a column in Excel?

Why did the Apple //e make a hideous noise if you inserted the disk upside down?

Should Catholics in a state of grace call themselves sinners?

Hard for me to understand one tip written in "The as-if rule" of cppreference

Is my guitar action too high or is the bridge too high?

Customs and immigration on a USA-UK-Sweden flight itinerary

How to track mail undetectably?

Avoiding repetition when using the "snprintf idiom" to write text

Why was Pan Am Flight 103 flying over Lockerbie?

What was the point of separating stdout and stderr?

Why is numpy sometimes slower than numpy + plain python loop?



User being prompted for sudo password after ssh


SSH Pub Key Login without Passwordssh and run script on remote host and answer expect answer automateecho $? prints 1 after running ssh-addBeing Prompted for Password After Already Registered Public Key On serverHow to forbid ssh connection after sudo -uHow are session keys, public/private keys generated on the ssh server and client and used?Unable to ssh from one Google Cloud RedHat/CentOS server to anotherSetup SSH public key for login without passwordUsing public keys for SSH authentication on several serversssh-copy-id succeeded, but still prompt password input













0















I have 2 servers, and I created a new user on both. I then generated a key pair and deployed the private key (~/.ssh/private.pem) on Server1 and the public key (~/.ssh/authorized_keys) on Server2.



From Server1 I run:



ssh -i private.pem username@Server2IP



this works and I login.



However, as soon as I log-in I get prompted to enter a sudo password.



When I update the /etc/sudoer.d/.. and write the following:



username ALL=(ALL) NOPASSWD:ALL



I no longer get the prompt.



The issue is, I don't want to grant my new user sudo access. How can this be solved?










share|improve this question







New contributor



Kam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
























    0















    I have 2 servers, and I created a new user on both. I then generated a key pair and deployed the private key (~/.ssh/private.pem) on Server1 and the public key (~/.ssh/authorized_keys) on Server2.



    From Server1 I run:



    ssh -i private.pem username@Server2IP



    this works and I login.



    However, as soon as I log-in I get prompted to enter a sudo password.



    When I update the /etc/sudoer.d/.. and write the following:



    username ALL=(ALL) NOPASSWD:ALL



    I no longer get the prompt.



    The issue is, I don't want to grant my new user sudo access. How can this be solved?










    share|improve this question







    New contributor



    Kam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      I have 2 servers, and I created a new user on both. I then generated a key pair and deployed the private key (~/.ssh/private.pem) on Server1 and the public key (~/.ssh/authorized_keys) on Server2.



      From Server1 I run:



      ssh -i private.pem username@Server2IP



      this works and I login.



      However, as soon as I log-in I get prompted to enter a sudo password.



      When I update the /etc/sudoer.d/.. and write the following:



      username ALL=(ALL) NOPASSWD:ALL



      I no longer get the prompt.



      The issue is, I don't want to grant my new user sudo access. How can this be solved?










      share|improve this question







      New contributor



      Kam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I have 2 servers, and I created a new user on both. I then generated a key pair and deployed the private key (~/.ssh/private.pem) on Server1 and the public key (~/.ssh/authorized_keys) on Server2.



      From Server1 I run:



      ssh -i private.pem username@Server2IP



      this works and I login.



      However, as soon as I log-in I get prompted to enter a sudo password.



      When I update the /etc/sudoer.d/.. and write the following:



      username ALL=(ALL) NOPASSWD:ALL



      I no longer get the prompt.



      The issue is, I don't want to grant my new user sudo access. How can this be solved?







      ssh sshd






      share|improve this question







      New contributor



      Kam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      Kam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      Kam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 14 mins ago









      KamKam

      101




      101




      New contributor



      Kam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Kam is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          0






          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          });


          }
          });






          Kam is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f527584%2fuser-being-prompted-for-sudo-password-after-ssh%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Kam is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Kam is a new contributor. Be nice, and check out our Code of Conduct.













          Kam is a new contributor. Be nice, and check out our Code of Conduct.












          Kam is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • 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%2funix.stackexchange.com%2fquestions%2f527584%2fuser-being-prompted-for-sudo-password-after-ssh%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

          Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

          The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

          Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...