We are using the Java API to transfer files using the class com.ssh.sft.File.RegularFile . It seems that we are not able to overwrite the already transfered file using the copy() method, as we receive the SftException as SSH_SFT_OK_HASH_MATCH .
How to control this using the API?.
Hmmm.... SSH_SFT_OK_HASH_MATCH should mean that the source file is exactly the same as a destination file and therefore the transfer was skipped. As far as I know currently it is only possible to control this behavior by setting environment variable of the process that uses API to disable the checksum checking:
See also the sftpg3 manpage
answered Sep 20 '11 at 21:51
Martin Dobsik ♦