Title: com.jcraft.jsch.JSchException: Auth fail - SAP CPI Fix
URL: https://iglow.stellar-clouds.com/errors/jsch-auth-fail.html
Author: Krishna Kishor Kammaje (SAP Mentor and SAP Press author. Founder of StellarClouds, where he builds iGlow.) https://www.linkedin.com/in/kammaje/
Published: 2026-12-01
Updated: 2026-12-01

# 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](https://userapps.support.sap.com/sap/support/knowledge/en/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](https://userapps.support.sap.com/sap/support/knowledge/en/3556093) and KBA [3601504](https://userapps.support.sap.com/sap/support/knowledge/en/3601504).
- The server no longer accepts the key's signature algorithm (KBA [3534144](https://userapps.support.sap.com/sap/support/knowledge/en/3534144)).

## How do I fix JSchException: Auth fail in SAP CPI?

1. Check the user name and the **Authentication** setting in the SFTP channel.
2. For key login, confirm the server holds the public part of the key pair you deployed.
3. Ask the server team which login methods and key algorithms the server accepts.
4. 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](https://iglow.stellar-clouds.com/common-sap-cpi-errors.html#nofile). You can also [trace the message](https://iglow.stellar-clouds.com/trace-message-sap-cpi.html) to see the exact step that failed.

## Related errors

- [PKIX path building failed (a trust problem for HTTPS)](https://iglow.stellar-clouds.com/errors/pkix-path-building-failed.html)
- [statusCode: 401 (the same kind of refusal on an HTTP call)](https://iglow.stellar-clouds.com/errors/http-401-statuscode.html)

See all ten in [the 10 most common SAP CPI errors and how to fix each](https://iglow.stellar-clouds.com/common-sap-cpi-errors.html) 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.

1. Open the panel. The failed message is listed with a Fix button.
2. Click **Fix**. iGlow reads the error and the SFTP step and explains that the server refused the login.
3. 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.

[Screenshot: iGlow panel chat for the demo iFlow Orders_Blog_Demo with a card of 2 failed messages, each with its time, the label Fails until fixed, the start of the HttpResponseException error text and a Fix button]

Failed messages in the iGlow panel: time, error text, a hint that the message fails until fixed, and a Fix button. (This example shows a different error.)

The Fix flow, shown on another error (a null amount in a Groovy mapping script in the demo iFlow Invoice_S4_to_Ariba): click Fix, read the cause, review the patch. In the clip the patch is rejected, so nothing changes. For an SFTP login error, iGlow gives next steps and does not change credentials or keys.

Nothing is saved or deployed without your click, and tenants tagged PRD are never changed. See the [Fix failed messages guide](https://iglow.stellar-clouds.com/fix-failed-messages-sap-cpi.html). [Add iGlow to Chrome](https://chromewebstore.google.com/detail/iglow-for-sap-integration/mkadedhglleneaiicijielffdpjgcjlh?utm_source=iglow-site&utm_medium=body&utm_campaign=errors-jsch-auth-fail).

## 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.

## More from the blog and guides

- [Content is not allowed in prolog An XML step got something that is not XML](https://iglow.stellar-clouds.com/errors/content-not-allowed-in-prolog.html)
- [Cannot produce target element A required target field got no value](https://iglow.stellar-clouds.com/errors/cannot-produce-target-element.html)
- [statusCode: 401 The receiver refused your credentials](https://iglow.stellar-clouds.com/errors/http-401-statuscode.html)
- [PKIX path building failed Missing certificate: add the chain to the keystore](https://iglow.stellar-clouds.com/errors/pkix-path-building-failed.html)
- [AI tools for SAP Integration Suite What exists in 2026 and what each is for](https://iglow.stellar-clouds.com/ai-tools-sap-integration-suite.html)
- [Create an iFlow with AI From a description or a spec to a deployed iFlow](https://iglow.stellar-clouds.com/create-iflow-with-ai.html)
- [Fix failed messages in SAP CPI Root cause, reviewed patch, one-click undo](https://iglow.stellar-clouds.com/fix-failed-messages-sap-cpi.html)
- [Test an iFlow with simulation Simulate changes, then send real test calls](https://iglow.stellar-clouds.com/test-iflow-simulation.html)
- [Trace a CPI message step by step Each step, its time, and where it failed](https://iglow.stellar-clouds.com/trace-message-sap-cpi.html)
- [Monitor Timer iFlows and JMS queues Missed Timer runs, waiting messages, failure hot spots](https://iglow.stellar-clouds.com/monitor-sap-cpi-timer-jms.html)
