SFTP client returns "Bad Message" error


During an SFTP client connection to a major shipping logistics provider, we see the following:

CMD -->       SSH_FXP_INIT Version: 4

RESPONSE -->  SSH_FXP_VERSION v3 - 0 extensions)

CMD -->       SSH_FXP_REALPATH Id: 1, Path: '.'

RESPONSE -->  SSH_FXP_NAME Id: 1, 1 item

CMD -->       SSH_FXP_OPEN Id: 2, Path: '/99812-1.ESM', Flag: 26

RESPONSE -->  SSH_FXP_STATUS Id: 2, Code: 5, Message: 'Bad message'

Our code is attempting to connect and upload a single file to their SFTP server. When speaking with their technical support staff, we learned:

Our server is running IBM Sterling Connect:Enterprise for UNIX 2.5.00 Secure FTP

Here is our Cipher Suite:   TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA

I don't see any method of debugging this issue from our code beyond the "Bad Message" response text. Could the SFTP component not be compatible with this SFTP server??

The version of components we are using is They are the purchased version, not the trial.

Thank you for any assistance you can provide.

edited 12/3/2017 1:04:08 PM
asked 8/10/2017 6:15:51 PM
add a comment

3 Answers


Yes, removing the leading "/" or "./" did resolve the issue on this particular SFTP server. I have never encountered this on other SFTP servers.

answered 11/16/2017 12:41:37 AM
add a comment

Following up on this issue....

It appears the IBM SFTP service is a bit nonstandard and doesn't like certain paths appended to the beginning of the remote file name, (such as a single forward slash / to indicate the remote home root folder location.)

The "Bad Message" response is a lower level UNIX file system error response that was simply passed through with no additional information.

Setting client.ServerOS to UNIX did not affect the issue.

Setting client.TransferType did not affect the issue.

For anyone else that runs into this.

answered 11/16/2017 12:41:37 AM
add a comment

Can you please send us the log file to support@componentpro.com? To generate the log file, please see this topic: Enable log capability

Did you add a '/' character to the beginning of the path? Have you tried removing it?

edited 12/4/2017 12:46:06 PM
answered 11/16/2017 12:41:37 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged ftp sftp or ask your own question.