2

We have a user that suddenly cannot log in via SSH on a Linux box. The error output in /var/log/secure is:

Invalid user foo from xx.xx.xx.xx

input_userauth_request: invalid user foo

Some additional details:

  • The user has a shell correctly specified in /etc/passwd

  • The user has a home directory with the correct permissions

  • We made no changes to sshd_config, verified by the mod date

  • No changes to user's .bashrc or .bash_profile

  • The user cannot log in via password or key

  • I've restarted sshd, and restarted the box

  • The user's shell history shows no commands that might have caused this problem

  • Ditto for root (used by only one person)

  • VERBOSE output for sshd gives no other details

  • No other user has this problem

I've done an extensive search, and have not found where else to look to identify the problem -- any insights would be greatly appreciated, thanks in advance.

  • 1
    What does getent passwd foo say? – jornane Aug 11 '15 at 17:01
  • Are you able to login as he using su foo? – Jakuje Aug 11 '15 at 17:02
  • Thanks for your replies: # getent passwd foo foo:x:32012:32013::/home/foo:/bin/bash And I am able to su foo as well. – user3693019 Aug 12 '15 at 19:36
  • be aware, auth.log/journal do not quote the user name, if you see quotes, that means your user is trying to log in with a user-name that literally contains quotes. (for example in an .ssh/config user directive) – ThorSummoner Apr 2 '18 at 20:51
1

A couple things you can check:

If you are using the AllowUsers directive make sure the IP/hostname matches what's defined in sshd_config.

If you are using hostnames instead of IP addresses with the AllowUsers directive verify the hostname reverses properly.

  • Thanks -- unfortunately I'm not using AllowUsers in sshd_config. – user3693019 Aug 12 '15 at 19:37
-3

It happened to me. It was because he was using a VPN. I had the exact same error. Exit the VPN if you have one.

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.