“Received message is too long” when connecting usi

2019-05-31 17:48发布

I would like to upload a file from my local unix machine to a remote server that supports SFTP. I tried to implement using Ant script that used SCP task with sftp attribute set to true, but it didn't work, since it would always error out:

com.jcraft.jsch.JSchException: 4: Received message is too long: 1416128878.

If you can help me achieve that using shell script that should resolve the issue. Also will I have to install sftp or something on my local machine so that the script works?

Any help here would be greatly appreciated.

Cheers,
Ashley

标签: ant sftp jsch
1条回答
可以哭但决不认输i
2楼-- · 2019-05-31 18:19

Your Ant script works. It's the server that does not work.

The server prints some message, thus violates SFTP protocol. Had you tried any standalone SFTP client, you will see that you are not able to connect.

The message starts Thin (0x ‭54 68 69 6E = ‭1416128878‬).

See also https://winscp.net/eng/docs/message_large_packet

查看更多
登录 后发表回答