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.
-
AuthorPosts
-
March 22, 2023 at 4:15 pm #102884Member
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.
March 22, 2023 at 5:18 pm #102895Member
bbyfacekiller
::I setup rsyslog and have the following log regarding ssh:
https://paste.debian.net/1274921/March 22, 2023 at 5:28 pm #102897Member
sybok
::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’.
March 22, 2023 at 5:29 pm #102898Member
bbyfacekiller
::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).
March 22, 2023 at 5:38 pm #102899Member
bbyfacekiller
March 24, 2023 at 9:11 am #103031Member
sybok
::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.March 25, 2023 at 4:33 am #103126Member
wildstar84
::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.
-
AuthorPosts
- You must be logged in to reply to this topic.