in reply to Re: Net::SFTP authentication problem
in thread Net::SFTP authentication problem

Thanks. That helped. Using SFTP::Foreign I get public key authentication and I can put the file to the remote server. I am getting an error on the put even though the file makes it to the destination: "Couldn't setstat remote file (fsetstat): SSH_FILEXFER_ATTR_PERMISSIONS". I'll do some research and see if I can figure out it out.

Replies are listed 'Best First'.
Re^3: Net::SFTP authentication problem
by salva (Canon) on Oct 17, 2008 at 08:27 UTC
    Probably, the server software (WS_FTP-SSH_6.1.1) does not support SFTP setattr operation.

    Try dissabling attribute copy on the put method:

    $sftp->put($local, $remote, copy_perm => 0);
      Salva, I am having the same issue: Couldn't setstat remote file (fsetstat): SSH_FILEXFER_ATTR_PERMISSIONS However, when I do what you suggest by adding copy_perm => 0, I get this error when my script runs: invalid option(s) 'copy_perm' at /opt/script.pl line 1392 Any ideas why that parameter is not working? Here is my code line: $sftp_connection->put($filepath, $remote_dir.$filename, copy_perm=>0); Thanks! Vic
        You are probably using and old version of the module, try upgrading to the last one (1.51 or 1.52_07).