Hi All ,
I am new to PERL , we are using SFTP to get the files from the remote server to our server .
I am able to do the SFTP to the remote server from commandline , but through PERL code i am getting errors.
I am using the Net::SFTP module, Please find the code i used below. i gave the password as null , since i am not using the password...
use Net::SFTP;
my $host = 'HOST NUNBER';
my $user = 'USER ID';
my $password = '';
my $sftp = Net::SFTP->new($host,"user"=>$user,"password"=>$password,de
+bug=>true);
#$sftp->get("rolling_trade_report.csv");
i am getting the following error
"Permission denied at //pkgs/linux/intel/perl/5.8.0/lib/site_perl/5.8.0/Net/SFTP.pm line 62"
DEBUG Mode:
idwsit1m36: Reading configuration data /etrade/home/ibia_ir/.ssh/config
idwsit1m36: Reading configuration data /etc/ssh_config
idwsit1m36: Connecting to 217.154.215.76, port 22.
idwsit1m36: Remote protocol version 2.0, remote software version 1.82 sshlib: WinSSHD 4.23
idwsit1m36: Net::SSH::Perl Version 1.29, protocol version 2.0.
.dwsit1m36: No compat match: 1.82 sshlib: WinSSHD 4.23
idwsit1m36: Connection established.
idwsit1m36: Sent key-exchange init (KEXINIT), wait response.
idwsit1m36: Algorithms, c->s: 3des-cbc hmac-sha1 none
idwsit1m36: Algorithms, s->c: 3des-cbc hmac-sha1 none
idwsit1m36: Entering Diffie-Hellman Group 1 key exchange.
idwsit1m36: Sent DH public key, waiting for reply.
idwsit1m36: Received host key, type 'ssh-dss'.
idwsit1m36: Host '217.154.215.76' is known and matches the host key.
idwsit1m36: Computing shared secret key.
idwsit1m36: Verifying server signature.
idwsit1m36: Waiting for NEWKEYS message.
idwsit1m36: Enabling incoming encryption/MAC/compression.
idwsit1m36: Send NEWKEYS, enable outgoing encryption/MAC/compression.
idwsit1m36: Sending request for user-authentication service.
idwsit1m36: Service accepted: ssh-userauth.
idwsit1m36: Trying empty user-authentication request.
idwsit1m36: Authentication methods that can continue: publickey,gssapi-with-mic,password.
idwsit1m36: Next method to try is publickey.
idwsit1m36: Next method to try is password.
idwsit1m36: Trying password authentication.
idwsit1m36: Will not query passphrase in batch mode.
idwsit1m36: Authentication methods that can continue: publickey,gssapi-with-mic,password.
idwsit1m36: Next method to try is publickey.
idwsit1m36: Next method to try is password.
idwsit1m36: Trying password authentication.
idwsit1m36: Will not query passphrase in batch mode.
idwsit1m36: Authentication methods that can continue: publickey,gssapi-with-mic,password.
idwsit1m36: Next method to try is publickey.
idwsit1m36: Next method to try is password.
idwsit1m36: Trying password authentication.
idwsit1m36: Will not query passphrase in batch mode.
idwsit1m36: Authentication methods that can continue: .
Permission denied at //pkgs/linux/intel/perl/5.8.0/lib/site_perl/5.8.0/Net/SFTP.pm line 62
Please help me to solve this.
Thanks,
Prasanna