Skip to main content
Question

Error during file sending Caused by: com.jcraft.jsch.SftpException: Bad message

  • October 29, 2024
  • 1 reply
  • 215 views

Forum|alt.badge.img+2

Hello everyone,

I'm experiencing an issue using the JSch library to establish an SFTP connection with an OpenSSH server configured on Windows. The error returned is com.jcraft.jsch.SftpException: Bad message.

Here are some details about my setup:

  • SFTP Client: JSch version 0.1.54
  • SSH Server: OpenSSH for Windows version 9.5

Complete error message: com.jcraft.jsch.SftpException: Bad message

Interestingly, I can successfully connect to the same OpenSSH server using GUI clients like FileZilla and WinSCP, but the issue arises specifically when attempting to connect from our middleware server using JSch.

 

Has anyone else encountered this type of error or have any suggestions on specific configurations to check or modify on JSch or OpenSSH?

Thank you in advance for your help and suggestions.

1 reply

ZTC ZTC JGOTA
Hero (Customer)
Forum|alt.badge.img+14
  • Hero (Customer)
  • 235 replies
  • April 21, 2025

Hello ​@Prince Emmanuel 

 

Were you able to fix the error message above?