How do I force SSH to use password instead of key?











up vote
0
down vote

favorite












So I need to log in to a machine using a password instead of a key, which I practically never do. Seems it should be easy but nope, ssh refuses to use anything but a key.



ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no root@ip-address
root@ip-address: Permission denied (publickey).









share|improve this question







New contributor




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




















  • You can also temporarily rename your .ssh directory to prevent ssh from accessing your public key: mv .ssh .ssh.save; ssh -vvv ...; rm -f -r .ssh; mv .ssh.save .ssh If you use the -vvv or -v -v -v "max verbose" option, you should get some good information.
    – Andrew Henle
    Nov 17 at 12:22















up vote
0
down vote

favorite












So I need to log in to a machine using a password instead of a key, which I practically never do. Seems it should be easy but nope, ssh refuses to use anything but a key.



ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no root@ip-address
root@ip-address: Permission denied (publickey).









share|improve this question







New contributor




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




















  • You can also temporarily rename your .ssh directory to prevent ssh from accessing your public key: mv .ssh .ssh.save; ssh -vvv ...; rm -f -r .ssh; mv .ssh.save .ssh If you use the -vvv or -v -v -v "max verbose" option, you should get some good information.
    – Andrew Henle
    Nov 17 at 12:22













up vote
0
down vote

favorite









up vote
0
down vote

favorite











So I need to log in to a machine using a password instead of a key, which I practically never do. Seems it should be easy but nope, ssh refuses to use anything but a key.



ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no root@ip-address
root@ip-address: Permission denied (publickey).









share|improve this question







New contributor




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











So I need to log in to a machine using a password instead of a key, which I practically never do. Seems it should be easy but nope, ssh refuses to use anything but a key.



ssh -o PreferredAuthentications=keyboard-interactive -o PubkeyAuthentication=no root@ip-address
root@ip-address: Permission denied (publickey).






ssh






share|improve this question







New contributor




GreyScreenOfMeh 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




GreyScreenOfMeh 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




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









asked Nov 17 at 10:41









GreyScreenOfMeh

111




111




New contributor




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





New contributor





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






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












  • You can also temporarily rename your .ssh directory to prevent ssh from accessing your public key: mv .ssh .ssh.save; ssh -vvv ...; rm -f -r .ssh; mv .ssh.save .ssh If you use the -vvv or -v -v -v "max verbose" option, you should get some good information.
    – Andrew Henle
    Nov 17 at 12:22


















  • You can also temporarily rename your .ssh directory to prevent ssh from accessing your public key: mv .ssh .ssh.save; ssh -vvv ...; rm -f -r .ssh; mv .ssh.save .ssh If you use the -vvv or -v -v -v "max verbose" option, you should get some good information.
    – Andrew Henle
    Nov 17 at 12:22
















You can also temporarily rename your .ssh directory to prevent ssh from accessing your public key: mv .ssh .ssh.save; ssh -vvv ...; rm -f -r .ssh; mv .ssh.save .ssh If you use the -vvv or -v -v -v "max verbose" option, you should get some good information.
– Andrew Henle
Nov 17 at 12:22




You can also temporarily rename your .ssh directory to prevent ssh from accessing your public key: mv .ssh .ssh.save; ssh -vvv ...; rm -f -r .ssh; mv .ssh.save .ssh If you use the -vvv or -v -v -v "max verbose" option, you should get some good information.
– Andrew Henle
Nov 17 at 12:22










3 Answers
3






active

oldest

votes

















up vote
3
down vote













You try using correct parameters for disabling authentication over keys.
Maybe server reject password authentication? Check server ssh configuration.






share|improve this answer








New contributor




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














  • 3




    Specifically, check for PasswordAuthentication directive in /etc/ssh/sshd_config on the server.
    – confetti
    Nov 17 at 12:04










  • This was indeed the issue.
    – GreyScreenOfMeh
    Nov 19 at 10:03


















up vote
2
down vote













Permission denied (publickey)


The "(publickey)" string in that error message is the list of authentication methods accepted by the remote server. In this case the remote server only accepts public key authentication. You can change your client parameters all you like, but it won't alter the fact that the server will only accept public key authentication.



To log in with a password, you'd have to start by reconfiguring the remote server to accept password authentication.






share|improve this answer




























    up vote
    1
    down vote













    Turns out the solution was to set PasswordAuthentication yes in /etc/ssh/sshd_config.



    Thanks to the several people who pointed me in the right direction.






    share|improve this answer








    New contributor




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


















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      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: 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
      });


      }
      });






      GreyScreenOfMeh 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%2fsuperuser.com%2fquestions%2f1376201%2fhow-do-i-force-ssh-to-use-password-instead-of-key%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      3
      down vote













      You try using correct parameters for disabling authentication over keys.
      Maybe server reject password authentication? Check server ssh configuration.






      share|improve this answer








      New contributor




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














      • 3




        Specifically, check for PasswordAuthentication directive in /etc/ssh/sshd_config on the server.
        – confetti
        Nov 17 at 12:04










      • This was indeed the issue.
        – GreyScreenOfMeh
        Nov 19 at 10:03















      up vote
      3
      down vote













      You try using correct parameters for disabling authentication over keys.
      Maybe server reject password authentication? Check server ssh configuration.






      share|improve this answer








      New contributor




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














      • 3




        Specifically, check for PasswordAuthentication directive in /etc/ssh/sshd_config on the server.
        – confetti
        Nov 17 at 12:04










      • This was indeed the issue.
        – GreyScreenOfMeh
        Nov 19 at 10:03













      up vote
      3
      down vote










      up vote
      3
      down vote









      You try using correct parameters for disabling authentication over keys.
      Maybe server reject password authentication? Check server ssh configuration.






      share|improve this answer








      New contributor




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









      You try using correct parameters for disabling authentication over keys.
      Maybe server reject password authentication? Check server ssh configuration.







      share|improve this answer








      New contributor




      moveax3 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 answer



      share|improve this answer






      New contributor




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









      answered Nov 17 at 10:52









      moveax3

      312




      312




      New contributor




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





      New contributor





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






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








      • 3




        Specifically, check for PasswordAuthentication directive in /etc/ssh/sshd_config on the server.
        – confetti
        Nov 17 at 12:04










      • This was indeed the issue.
        – GreyScreenOfMeh
        Nov 19 at 10:03














      • 3




        Specifically, check for PasswordAuthentication directive in /etc/ssh/sshd_config on the server.
        – confetti
        Nov 17 at 12:04










      • This was indeed the issue.
        – GreyScreenOfMeh
        Nov 19 at 10:03








      3




      3




      Specifically, check for PasswordAuthentication directive in /etc/ssh/sshd_config on the server.
      – confetti
      Nov 17 at 12:04




      Specifically, check for PasswordAuthentication directive in /etc/ssh/sshd_config on the server.
      – confetti
      Nov 17 at 12:04












      This was indeed the issue.
      – GreyScreenOfMeh
      Nov 19 at 10:03




      This was indeed the issue.
      – GreyScreenOfMeh
      Nov 19 at 10:03












      up vote
      2
      down vote













      Permission denied (publickey)


      The "(publickey)" string in that error message is the list of authentication methods accepted by the remote server. In this case the remote server only accepts public key authentication. You can change your client parameters all you like, but it won't alter the fact that the server will only accept public key authentication.



      To log in with a password, you'd have to start by reconfiguring the remote server to accept password authentication.






      share|improve this answer

























        up vote
        2
        down vote













        Permission denied (publickey)


        The "(publickey)" string in that error message is the list of authentication methods accepted by the remote server. In this case the remote server only accepts public key authentication. You can change your client parameters all you like, but it won't alter the fact that the server will only accept public key authentication.



        To log in with a password, you'd have to start by reconfiguring the remote server to accept password authentication.






        share|improve this answer























          up vote
          2
          down vote










          up vote
          2
          down vote









          Permission denied (publickey)


          The "(publickey)" string in that error message is the list of authentication methods accepted by the remote server. In this case the remote server only accepts public key authentication. You can change your client parameters all you like, but it won't alter the fact that the server will only accept public key authentication.



          To log in with a password, you'd have to start by reconfiguring the remote server to accept password authentication.






          share|improve this answer












          Permission denied (publickey)


          The "(publickey)" string in that error message is the list of authentication methods accepted by the remote server. In this case the remote server only accepts public key authentication. You can change your client parameters all you like, but it won't alter the fact that the server will only accept public key authentication.



          To log in with a password, you'd have to start by reconfiguring the remote server to accept password authentication.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 17 at 15:56









          Kenster

          4,75021932




          4,75021932






















              up vote
              1
              down vote













              Turns out the solution was to set PasswordAuthentication yes in /etc/ssh/sshd_config.



              Thanks to the several people who pointed me in the right direction.






              share|improve this answer








              New contributor




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






















                up vote
                1
                down vote













                Turns out the solution was to set PasswordAuthentication yes in /etc/ssh/sshd_config.



                Thanks to the several people who pointed me in the right direction.






                share|improve this answer








                New contributor




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




















                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  Turns out the solution was to set PasswordAuthentication yes in /etc/ssh/sshd_config.



                  Thanks to the several people who pointed me in the right direction.






                  share|improve this answer








                  New contributor




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









                  Turns out the solution was to set PasswordAuthentication yes in /etc/ssh/sshd_config.



                  Thanks to the several people who pointed me in the right direction.







                  share|improve this answer








                  New contributor




                  GreyScreenOfMeh 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 answer



                  share|improve this answer






                  New contributor




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









                  answered Nov 19 at 10:05









                  GreyScreenOfMeh

                  111




                  111




                  New contributor




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





                  New contributor





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






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






















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










                       

                      draft saved


                      draft discarded


















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













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












                      GreyScreenOfMeh 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%2fsuperuser.com%2fquestions%2f1376201%2fhow-do-i-force-ssh-to-use-password-instead-of-key%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

                      AnyDesk - Fatal Program Failure

                      How to calibrate 16:9 built-in touch-screen to a 4:3 resolution?

                      QoS: MAC-Priority for clients behind a repeater