I have created new user using useradd USER, but I can't SSH to the server and login with it. I already have another account to which I can SSH easily.

Running ssh -v USER@domain.tld is returning this message after entering password:

debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password

When trying acocunt that works I get

debug1: Authentication succeeded (password).

I know the password is correct, because once I SSH using the working account I can change user successfully.

  • What do the server logs say when you're trying the failed login? – MadHatter Jun 30 '15 at 15:05

I had a similar issue. Turned out that /etc/ssh/sshd.conf had AllowUsers line. Resolved it by adding new user to that line and restarting SSH.

  • Great :) it was located here /etc/ssh/sshd_config and I just restarted sshd after changes and it worked. – Dexa Jun 30 '15 at 15:16
  • for me it was AllowedGroups but same cause/fix – rob Oct 11 '17 at 15:54

I had the problem that permissions of .ssh and authorized_keys were not right. Setting 700 to .ssh and 600 to authorized_keys solved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.