Access Denied when trying to SFTP with shell access restricted
I'm having some issues with SFTP. I am getting the error, "Access Denied," when trying to SFTP via WinSCP to my Linux server.
I know the password is correct. Tried setting it multiple times with same results.
When I change the shell (in /etc/passwd) for this user account to /bin/bash, I can log in via WinSCP SFTP with no issues. The problem is that I don't want the user account to be able to log into the shell. I have tried using /sbin/nologin, /bin/false, and /dev/null in /etc/passwd, but none of them allow SFTP login, even when defined in /etc/shells. "Access Denied."
Manually editing the files rather than using chsh. Don't know if that makes a difference.
Not sure what I am doing wrong.