can't log in over SSH, shows invalid user when they really aren't
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
can't log in over SSH, shows invalid user when they really aren't
Recently I started having this problem where most users on the system are unable to log into the system over SSH. Their user name and password is correct, however it shows them as invalid when they are in fact valid. I've tried changing their password but that didn't work. I also tried deleting their account, as well as their home directory, and then recreating the account, but that didn't work. Only root and perhaps one or two other select accounts are able to log in without problems. I even tried a reboot to see if that would fix it, but as I theorized, it wouldn't. I also checked and ensured their home directory was chowned to them, and that they even had a home directory. Any assistance would be greatly appreciated to help me get this issue resolved. As a dsie note, they are showing up as invalid in /vars/logs/auth.log. Running Debian 5.0 Lenny
Thank you.
Can you run the login process again but with verbose output (-v or -vv) and post it here? Can we also see your /etc/ssh/sshd.conf file please? I'm assuming the users can log in locally and it works OK?
I ran into this problem before at work. I had two similar Linux machines and it turns out that I was trying to access the wrong one. I have also seen similar problems where a change had been made to the domain controller (Windows Server) and the names would resolve incorrectly. I would verify the IP address and host name on both ends as well as double check and DNS / DHCP to make sure that they are still correct.
Also check to see that each user has a valid shell, e.g., /bin/sh or /bin/bash. If they don't, they won't be able to login. The shell is the last part of the user entry in /etc/passwd:
Was the sshd daemon running ?
Did you change the sshd port ?
Can you login via local vitrual console ? if so, maybe the firewall setting cause this.
Can the sshd connecting port be seen from other computer ?
And check if the iptables make this happen...
That's the all I know about sshd troubleshooting...
I wish it helps...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.