iGlow / Blog / JSchException: Auth fail
SAP CPI error
com.jcraft.jsch.JSchException: Auth fail in SAP CPI
Short answer: This error means the SFTP server refused the login from SAP CPI. It usually happens when the user name, the password or key, or the authentication method in the SFTP channel does not match what the server accepts. To fix it, check these with the server team and run the SSH connectivity test.
The problem
A scheduled SFTP poll fails and the log says only "Auth fail". It does not say whether the user, the password, the key or the login method is wrong, and the server team cannot see the problem from their side. You go back and forth on key types and settings with no clear answer.
What does JSchException: Auth fail mean?
JSchException: Auth fail comes from JSch, the Java SSH library inside the CPI SFTP adapter. The connection to the server worked, and the server's host key was accepted. Then the login step failed. SAP covers the message in KBA 2122397.
Full text in the log: com.jcraft.jsch.JSchException: Auth fail
Why does it happen?
The most common cause comes first.
- A wrong user name, password or private key.
- The channel uses public key login, but the server does not have the matching public key.
- The server accepts other methods than the one chosen. SAP shows related cases in KBA 3556093 and KBA 3601504.
- The server no longer accepts the key's signature algorithm (KBA 3534144).
How do I fix JSchException: Auth fail in SAP CPI?
- Check the user name and the Authentication setting in the SFTP channel.
- For key login, confirm the server holds the public part of the key pair you deployed.
- Ask the server team which login methods and key algorithms the server accepts.
- Run Manage Security > Connectivity Tests > SSH to test the login. Fix what it reports, then resend.
How do I confirm it is fixed?
The SSH test succeeds, and the next SFTP poll or send finishes without the exception.
Which adapter or step causes it?
The SFTP sender and receiver adapters.
Tips to avoid it next time
Ask the server team for the exact login method before you build the channel. Keep the private key alias and the user name in your notes. When a server is upgraded, its allowed key types can change, so a login that worked for years can start to fail. If the error says the file or folder is missing instead, you have a different problem: see No such file or directory. You can also trace the message to see the exact step that failed.
Related errors
- PKIX path building failed (a trust problem for HTTPS)
- statusCode: 401 (the same kind of refusal on an HTTP call)
See all ten in the 10 most common SAP CPI errors and how to fix each for SAP Cloud Integration (SAP Integration Suite).
The easy way: fix JSchException Auth fail with iGlow
iGlow is an AI agent for SAP Integration Suite and CPI that runs as a Chrome extension side panel. The hunt above is what the Fix button does for you.
- Open the panel. The failed message is listed with a Fix button.
- Click Fix. iGlow reads the error and the SFTP step and explains that the server refused the login.
- Follow the next steps: what to confirm with the server team, such as the user, the login method and the key algorithm, and the SSH connectivity test to run. iGlow does not set real passwords or keys for you.

Nothing is saved or deployed without your click, and tenants tagged PRD are never changed. See the Fix failed messages guide. Add iGlow to Chrome.
Questions
What does com.jcraft.jsch.JSchException: Auth fail mean?
The SFTP server refused the login. The connection was made, but the user, password, key or method was not accepted.
How do I fix JSchException: Auth fail in SAP CPI?
Check user name and authentication in the SFTP channel, make sure the server has the matching public key, and run the SSH connectivity test.
Which adapter or step causes JSchException: Auth fail?
The SFTP adapter, in a sender or receiver channel.