in reply to Re^2: Net-SFTP-Foreign: SSH slave exited unexpectedly with error code 255
in thread Net-SFTP-Foreign: SSH slave exited unexpectedly with error code 255

For some reason the ssh client doesn't like the StrictHostKeyChecking option.

Which one are you using?

What do you get when you run ssh -V at the terminal. In case you don't have terminal access, add the following line to your script:

system "ssh -V 1>&2";