in reply to Re^6: Net::SFTP::Foreign key_path
in thread Net::SFTP::Foreign key_path

So, the remote and local user names are different and you need to pass the correct one, right?

Replies are listed 'Best First'.
Re^8: Net::SFTP::Foreign key_path
by Vita (Novice) on Feb 26, 2016 at 22:34 UTC

    That was it ... the names ... DUH! I was not providing the username

    Changed

     $sftp = Net::SFTP::Foreign->new( $remnode,key_path => '/export/home/secbatch/.ssh/id_rsa', more => '-v', );

    To

    %args = ( "user" => $remuser, key_path => '/export/home/secbatch/.ssh/ +id_rsa' ); $sftp = Net::SFTP::Foreign->new( $remnode,%args, more => '-v', );

    Thank you so much. Enjoy your weekend.