The following guide explains some techniques for troubleshooting authentication issues with SFTP.
A key piece of information to keep in mind is that SFTP makes use of SSHD to authenticate to the server.
That means that only users that are found in the /etc/passwd file on the server will be able to authenticate and use SFTP. Regular FTP users created in the cPanel interface will not be in the /etc/passwd file, so you may not use those users. Only the main cPanel user can use SFTP.
Furthermore, the users that are allowed to use SFTP can be influenced by the SSHD configuration at:
One example is the AllowUsers configuration. The following configuration would only allow the root user to use SFTP on the server:
If you would like to allow another user to to authenticate, you can edit the configuration to include that user:
AllowUsers root additionaluser
Then restart the SSHD server with the following command:
If you're still having difficulties with authentication, check the SSHD configuration for other directives that could be interfering.
Additionally, you could also try resetting the user's password and verify that the password works when attempting to login via other interfaces such as cPanel or SSH.
You may also configure enabling logging to get more information about the issue. We have a guide on how to do this: