[ssh] Permission denied, please try again

Forum Forums New users New Users and General Questions [ssh] Permission denied, please try again

  • This topic has 6 replies, 3 voices, and was last updated Mar 25-4:33 am by wildstar84.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #102884
    Member
    bbyfacekiller

      Hi,

      I want to enable ssh on one of my machines.
      I installed openssh-server and started sshd with:
      sudo service start ssh
      Checked it with:
      sudo service status ssh
      and it seems to be running fine.

      When I try to log in to the the machine, I get the passwd prompt. Upon entering the correct passwd, I get the following error:
      Permission denied, please try again.

      I try to uncomment:
      #PasswordAuthentication yes
      in the /etc/ssh/sshd_config file and restart sshd, but I still get the “Permission denied, please try again” error.

      Does anyone know what might cause this?

      • This topic was modified 1 month, 2 weeks ago by bbyfacekiller.
      • This topic was modified 1 month, 2 weeks ago by bbyfacekiller.
      #102895
      Member
      bbyfacekiller
        Helpful
        Up
        0
        ::

        I setup rsyslog and have the following log regarding ssh:
        https://paste.debian.net/1274921/

        #102897
        Member
        sybok
          Helpful
          Up
          0
          ::

          I really do not know what is the issue apart from dumb mistake in password (numlock off, capslock on, different keyboard layout, copy-pasting the password with end-of-line character that should not be there and other silly mistakes).
          I sometimes make these myself.

          Do you have any firewall (such as ‘fail2ban’ or others) installed? But why would it report failed password? Similarly with changed default SSH port(s).

          PS: If you would try to login as ‘root’ (which you do not since the paste contains ‘ami’), more changes are necessary in the file that you have edited – ‘PermitRootLogin’.

          #102898
          Member
          bbyfacekiller
            Helpful
            Up
            0
            ::

            So I created a new user and it lets me connect via ssh to it and then i can ‘su ami’, but still cant log into ami (my main user).

            #102899
            Member
            bbyfacekiller
              Helpful
              Up
              0
              ::

              It worked to connect when I changed the password of the “ami” account!

              #103031
              Member
              sybok
                Helpful
                Up
                0
                ::

                Glad you managed to solve it.

                Perhaps there is a parsing error of the password in SSH (or the password breaks some rules).
                It would be interesting to see whether it is reproducible on other systems, preferably with other SSH versions.

                #103126
                Member
                wildstar84
                  Helpful
                  Up
                  0
                  ::

                  I would highly recommend that instead of password authentication, you set up a public key and disallow root login, for security. I explain how I did that in section III of this article: https://wildstar84.wordpress.com/2021/10/12/how-to-create-linux-router-from-a-mini-pc/ BTW, this was an antiX installation. 😉

                  Regards,

                  Jim

                  • This reply was modified 1 month, 2 weeks ago by wildstar84.
                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.