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

Thanks, it is working now.

Answer changed

I believe it was in two different styles of writing ssh-options I've found. Proably I mixed them.
The contents of the testfile are not important, that were only test without secure data. But thanks for the hint.
Have A Nice Weekend, Thomas

PS:
Now I get a warning in the other Web application, where I wanted to insert the changes made in the old system:

Warning: Identity file $keyfilepath not accessible: No such file or directory.

.. but the files are transfered right and have the right content. Is this able to understand?

  • Comment on Re^6: Net-SFTP-Foreign: SSH slave exited unexpectedly with error code 255
  • Download Code

Replies are listed 'Best First'.
Re^7: Net-SFTP-Foreign: SSH slave exited unexpectedly with error code 255
by salva (Canon) on Apr 10, 2015 at 11:26 UTC
    Warning: Identity file $keyfilepath not accessible: No such file or directory.

    Again, it looks as if you where quoting too much or using the wrong set of quotes (single instead of double, or qw)... Ummm, I guess you are passing $keyfilepath as follows:

    $sftp = Net::SFTP::Foreign->new(... more => [qw(-i $keyfilepath)], ...);
    Instead, it should be...
    $sftp = Net::SFTP::Foreign->new(... more => ['-i', $keyfilepath], ...);
    It is probably working anyway because you have the private key in the standard place ~/.ssh/id_*

      Sorry for that. I tried qq now, which isn't working too. In one case I have it to give 2 ssh-options in: (I'll try in your way to write it)

      more    => ['-i', $keyfilepath, '-o', 'StrictHostKeyChecking=no'],

      This now should work. Thanks again