ssh-sftp-perl-users Mailing List for Net::SSH and Net::SFTP - Perl modules (Page 12)
Brought to you by:
dbrobins
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(4) |
Feb
(15) |
Mar
(13) |
Apr
(8) |
May
(5) |
Jun
(21) |
Jul
(4) |
Aug
(9) |
Sep
(11) |
Oct
(14) |
Nov
(15) |
Dec
(24) |
2005 |
Jan
(10) |
Feb
(20) |
Mar
(16) |
Apr
(10) |
May
(12) |
Jun
(16) |
Jul
(18) |
Aug
(21) |
Sep
(11) |
Oct
(19) |
Nov
(16) |
Dec
(9) |
2006 |
Jan
(17) |
Feb
(32) |
Mar
(60) |
Apr
(21) |
May
(24) |
Jun
(1) |
Jul
(6) |
Aug
(18) |
Sep
(4) |
Oct
(9) |
Nov
(31) |
Dec
(10) |
2007 |
Jan
(8) |
Feb
(11) |
Mar
(3) |
Apr
(7) |
May
(4) |
Jun
(6) |
Jul
(7) |
Aug
(3) |
Sep
(2) |
Oct
(5) |
Nov
(5) |
Dec
(5) |
2008 |
Jan
(12) |
Feb
(5) |
Mar
(7) |
Apr
(4) |
May
(37) |
Jun
(9) |
Jul
(24) |
Aug
(5) |
Sep
(2) |
Oct
(7) |
Nov
(6) |
Dec
(7) |
2009 |
Jan
(18) |
Feb
(9) |
Mar
(14) |
Apr
(14) |
May
(1) |
Jun
(14) |
Jul
(4) |
Aug
(6) |
Sep
(4) |
Oct
(12) |
Nov
(4) |
Dec
|
2010 |
Jan
|
Feb
(3) |
Mar
|
Apr
(1) |
May
(4) |
Jun
|
Jul
(6) |
Aug
(6) |
Sep
|
Oct
(7) |
Nov
(2) |
Dec
(5) |
2011 |
Jan
(2) |
Feb
|
Mar
|
Apr
(1) |
May
(8) |
Jun
(1) |
Jul
|
Aug
(2) |
Sep
|
Oct
(4) |
Nov
(9) |
Dec
(7) |
2012 |
Jan
(1) |
Feb
(19) |
Mar
(4) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(2) |
Apr
(2) |
May
|
Jun
(5) |
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
(6) |
Dec
|
2014 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Uday M. <umo...@me...> - 2008-05-30 20:25:40
|
Ibrahim, Yes of course, it's made for it. If you have just enough perl kung fu you can do almost what ever you want with Net::SSH. Look up on the Internet you should be able to find alot of ideas. Here is a start : http://search.cpan.org/dist/Net-SSH-Perl/lib/Net/SSH/Perl.pm UM On Fri, May 30, 2008 at 3:53 PM, Ibrahim Salloum <sal...@gm...> wrote: > Hello Everybody, > > i wanted to know if it s possible to use perl in order to execute many > commands using ssh ( to a rouer) from the keyboard. in other word, open ssh > session from ur linux box using perl. > > for example: after i run the perl program , i ll be able to execute any > command from keyboard. > > if anybody has an answer or a sample program it will be appreciated > > thank you > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > > |
From: Ibrahim S. <sal...@gm...> - 2008-05-30 19:53:27
|
Hello Everybody, i wanted to know if it s possible to use perl in order to execute many commands using ssh ( to a rouer) from the keyboard. in other word, open ssh session from ur linux box using perl. for example: after i run the perl program , i ll be able to execute any command from keyboard. if anybody has an answer or a sample program it will be appreciated thank you |
From: <moh...@wi...> - 2008-05-30 15:06:19
|
Dear All, Till now I was working on Linux so I install all the modules needed for SSH (Net::SSH::Perl, Math::pari etc) from CPAN. And now the requirement is that, I have to do the same task on Windows m/c. So request you to let me know what all modules I needed for the same task and if possible please send me the link for the same. Let me brief you what is my task here right now. XML file ---> Perl Script ---(ssh)--> AUT Here Perl script get the required data from XML file to execute the AUT. XML and Perl script resides at Windows and AUT at Linux. So basically I have to telnet(ssh) to Linux m/c from Windows and run the AUT and get back the result with the perl script. And I achieved the same at Linux but not sure how to do the same at Windows and required modules as I never worked on Windows. Thanks for you great help. Regards, Mustafa |
From: <moh...@wi...> - 2008-05-28 15:02:24
|
Hi All, I have written a Perl script, which deals with the ftp ing (transferring) the file to remote server and executing a Perl script (AUT) at remote m/c. The script is as below and here I have 2 doubts, so please help me to resolve this. 1) I am getting the message like "could not transfer the file to server" but it is ftp ing the flie to remote m/c, and I can see that file ( root1.txt ) there. 2) And I want to run the perl script (AUT) at remote m/c depending on the data we sent, so could you please let me know how can I achieve this. Is it possible for me to do system("test.pl"), If I am at SFTP mode. Please see comment line in the code below. #!/usr/bin/perl -w use strict; use warnings; use Net::SFTP; my $server="A.BY.C.D"; my $user="roserag"; my $password="june@123"; my %args = (user => "$user", password => "$password", ssh_args => []); $args{debug} = 1; $args{user} = "root"; my $file="local.txt"; my $rfile = "root1.txt"; my $sftp=Net::SFTP->new($server, %args) or die "could not open connection to $server\n"; $sftp->put($file,$rfile) or die " could not transfer the file to server \n"; # system("test.pl"); Is this command work out. exit; [gaurav@testbrix Examples]$ perl sftp3.pl testbrix.wipro.com: Reading configuration data /home/gaurav/.ssh/config testbrix.wipro.com: Reading configuration data /etc/ssh_config ................................... ................................... testbrix.wipro.com: sftp: In write loop, got 510 offset 0 testbrix.wipro.com: sftp: Sent message T:10 I:2 testbrix.wipro.com: sftp: Sent message T:4 I:3 could not transfer the file to server But I can see the file 1,1 All Regards, Mustafa |
From: Rajnikant <raj...@pe...> - 2008-05-28 08:04:06
|
Hi all, I was trying to use SFTP in multithreaded application. I observed many segmentation faults there. Following is the code snipet: use threads; use Net::SFTP; my $thrId = 1; my $thread = threads->new (\&ftpThreadEntry,$thrId); $thrId = 2; print("Creating second thread \n"); my $thread1 = threads->new (\&ftpThreadEntry,$thrId); sub ftpThreadEntry() { my $ThrId = shift; print (" Thread $ThrId in ftpThreadEntry func\n"); } $thread->join(); $thread1->join(); My Observations : 1. If we comment out 'use Net::SFTP' then this code runs fine without segmentation fault. 2. If we uncomment 'use Net::SFTP', it gives segmentation fault :(. Can anyone experienced such situation? Is there any dependency in these modules or I'm doing it wrong? Thanks in advance. ~~~~~~~~~~~~~~~~~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |
From: Rajnikant <raj...@pe...> - 2008-05-28 07:02:24
|
Hello everyone, I want to connect my client to multiple servers and download files using SFTP. So as to connect and download file from server I'm using seperate thread. I'm getting segmentation fault while creating the SFTP connection/Object in SFTP::New method. Following is the code snipet: use threads; use Net::SFTP; my $host = 'xx.yy.zz.aa'; my $user = 'usr'; my $password = 'usr123'; my $thread = threads->new (\&ftpThreadEntry,$host,$user,$password); my $thread1 = threads->new (\&ftpThreadEntry,$host,$user,$password); sub ftpThreadEntry() { my $host_l = shift; my $usr = shift; my $passwd = shift; print( "$host $usr $passwd \n"); my %args = ( "user", $usr, "password", $passwd ); my $sftp = Net::SFTP->new($host_l,%args); if ($sftp) { print(" got connected to $host_l now\n"); } } $thread->join(); $thread1->join(); after runing this, I'm getting following errors messages: PARI: *** forbidden at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 17. thread failed to start: PARI: *** unknown type 41. at /usr/lib/perl5/site_perl/5.8.8/Net/SSH/Perl/Util/SSH2MP.pm line 17. Segmentation fault Could someone please help me out finding whats wrong in code? How can we debug threads and core files with perl debugger? Thanks in advance. ~~~~~~~~~~~~~~~~~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |
From: Heiko J. <ja...@hb...> - 2008-05-27 14:44:14
|
Am Dienstag, den 27.05.2008, 10:34 -0400 schrieb Ibrahim Salloum: > Starting httpd: Syntax error on line 280 > of /etc/httpd/conf/httpd.conf: > DocumentRoot must be a directory > > > i got this error message when i try to start httpd > > any ideas First: This is a mailing list dedicated to SSH/SFTP usage through Perl modules and not a mailing list on Apache problems. You should report your problem elsewhere. Second: Did you even read the error message or did you just copy'n'paste it to your mail? Did you try to understand it? Unless the error message is wrong (in which case you would have to supply far more detailed information) it simply means that your "DocumentRoot" configuration entry in your httpd.conf points to something that is not a directory. Heiko PS: One more advice (applicable to any other mailing list): Please try to provide more specific mail subjects. |
From: Ibrahim S. <sal...@gm...> - 2008-05-27 14:34:44
|
hello everybody Starting httpd: Syntax error on line 280 of /etc/httpd/conf/httpd.conf: DocumentRoot must be a directory i got this error message when i try to start httpd any ideas thx in advance |
From: Rajnikant <raj...@pe...> - 2008-05-27 11:53:35
|
Hello everyone, I'm trying to replace FTP module with SFTP in my assignment. I have some doubts related with same. 1. why are there no ascii and binary methods associated with SFTP? 2. Are there any methods exists in SFTP similar to that of login,ascii,binary as that in FTP module? 3. How to check SFTP method failure in Perl? Thanks in advance. ~~~~~~~~~~~~~~~~~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |
From: Rajnikant <raj...@pe...> - 2008-05-27 08:54:40
|
I think I got my mistake. After 'get' method call I'm getting sftp->status as 0 which is 'No Error' :). So I modified my code as below: $sftp->get($Remote,$Local); if($sftp->status) { print(" Get method failed"); return ; } else { print(" Got the file from remote"); } Do anyone see anything wrong in this code? Thanks. ~~~~~~~~~~~~~~~~~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -----Original Message----- From: Fredrik Stridfeldt [mailto:str...@gm...] Sent: Monday, May 26, 2008 1:22 PM To: raj...@pe... Subject: Re: [Ssh-sftp-perl-users] SFTP->get function failing Your sample works fine. [fredriks@REMOTEHOST]$ ls -l remote.txt -rw-r--r-- 1 fredriks fredriks 24 May 26 09:43 remote.txt [fredriksf@LOCALHOST ~]$ ls -l local.txt ls: local.txt: No such file or directory [fredriks@LOCALHOST ~]$ perl testftp.pl <---- (your sample) Get failed <--- (get failed not true) [fredriks@LOCALHOST ~]$ ls -l local.txt -rw-r--r-- 1 fredriks fredriks 24 May 26 09:43 local.txt -- my $err = $sftp->status(); # $err gets 0 value -- <- is not true /F On Mon, May 26, 2008 at 9:30 AM, <raj...@pe...> wrote: > Hello everyone, > > I'm studying SFTP. I have sample program to transfer files across two machines written in Perl. Some how my SFTP->get function is failing, but the file I'm trying to get from server is getting copied on client. > > Following is the code snipet: > #!/usr/bin/perl > use Net::SFTP; > > my $host = 'xx.yy.zz.aa'; > # User name and password > my %args = ( > "user", 'user1', > "password", 'password1' > ); > > my $localFilename = 'local.txt'; > my $remoteFilename = 'remote.txt'; > > # Creating the SFTP connection > my $sftp = Net::SFTP->new($host,%args); # sftp object and connection > get created successfully > > # Downloading file now > if(!$sftp->get($remoteFilename,$localFilename)) > { > my $err = $sftp->status(); # $err gets 0 value > print (" Get failed"); > } > > Do anyone have any clue why my get function is failing? > I'm using perl 5.8.6 on Fedora core 4. > > Thanks in advance. > > ~ Regards, > Rajnikant Jachak > > DISCLAIMER > ========== > This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. > > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by: Microsoft Defy all challenges. > Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |
From: Rajnikant <raj...@pe...> - 2008-05-26 15:31:03
|
Hello everyone, I'm using SFTP to transfer file across two machines. The SFTP object creation and connection establishement is taking more time. Following is the code snipet in Perl that I'm using: #!/usr/bin/perl use Net::SFTP; my $host = 'xx.yy.zz.aa'; my %args = ( "user", 'root', "password", 'pass123' ); my $remoteFilename = '/var/opt/mydata/remote.txt'; my $localFilename = '/root/Test/local.txt'; my $sftp = Net::SFTP->new($host,%args); print (" Got connected to host"); if(!($sftp->get($remoteFilename,$localFilename)) ) { my $err = $sftp->status(); print (" Get failed "); } The SFTP object creation takes around 15-25 seconds to get connected to server. Is it observed behaviour or is there any bug in my code? ~~~~~~~~~~~~~~~~~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |
From: Rajnikant <raj...@pe...> - 2008-05-26 13:37:54
|
Thanks Fredrik. I'm using Perl v5.8.8. The thing is, this is very basic code for SFTP. I have strong gut feeling of going wrong somwhere :(. Can some one share his experience about SFTP->get function? ~~~~~~~~~~~~~~~~~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -----Original Message----- From: Fredrik Stridfeldt [mailto:str...@gm...] Sent: Monday, May 26, 2008 2:51 PM To: raj...@pe... Subject: Re: [Ssh-sftp-perl-users] SFTP->get function failing Whatever floats your boat is correct i guess ;) foreach(@files) { chomp($_); &log("Transfering $ldir\/$_ with destination $ddir\/$_"); $i = $sftp->put("$ldir/$_","$ddir/$_"); &crash("Transfer aborted <$ddir>: no such file/directory or no permissions",$ldir) if !defined($i); &log("Transfer complete..."); } and such.. This is perl, v5.8.5 on Linux hostname 2.6.9-67.0.7.ELsmp #1 SMP (RH ES) On Mon, May 26, 2008 at 11:02 AM, <raj...@pe...> wrote: > > Thanks Fredrik for your reply. > > After reading your reply I again tried debugging same issue, but still I'm facing same problem :(. > > But if I changed that 'If condition' as 'if(!defined ($sftp->get($remoteFilename,$localFilename))' then everything works fine. > > Which is the correct way to put condition in this case? > Could you please share Perl version and unix flavor where you ran this test program? > > > ~ Regards, > Rajnikant Jachak > > DISCLAIMER > ========== > This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. > > Your sample works fine. > > [fredriks@REMOTEHOST]$ ls -l remote.txt > -rw-r--r-- 1 fredriks fredriks 24 May 26 09:43 remote.txt > > [fredriksf@LOCALHOST ~]$ ls -l local.txt > ls: local.txt: No such file or directory [fredriks@LOCALHOST ~]$ perl > testftp.pl <---- (your sample) Get failed <--- (get failed not > true) [fredriks@LOCALHOST ~]$ ls -l local.txt > -rw-r--r-- 1 fredriks fredriks 24 May 26 09:43 local.txt > > -- my $err = $sftp->status(); # $err gets 0 value -- <- is not true > > /F > > On Mon, May 26, 2008 at 9:30 AM, <raj...@pe...> wrote: >> Hello everyone, >> >> I'm studying SFTP. I have sample program to transfer files across two machines written in Perl. Some how my SFTP->get function is failing, but the file I'm trying to get from server is getting copied on client. >> >> Following is the code snipet: >> #!/usr/bin/perl >> use Net::SFTP; >> >> my $host = 'xx.yy.zz.aa'; >> # User name and password >> my %args = ( >> "user", 'user1', >> "password", 'password1' >> ); >> >> my $localFilename = 'local.txt'; >> my $remoteFilename = 'remote.txt'; >> >> # Creating the SFTP connection >> my $sftp = Net::SFTP->new($host,%args); # sftp object and connection >> get created successfully >> >> # Downloading file now >> if(!$sftp->get($remoteFilename,$localFilename)) >> { >> my $err = $sftp->status(); # $err gets 0 value >> print (" Get failed"); >> } >> >> Do anyone have any clue why my get function is failing? >> I'm using perl 5.8.6 on Fedora core 4. >> >> Thanks in advance. >> >> ~ Regards, >> Rajnikant Jachak >> >> DISCLAIMER >> ========== >> This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. >> >> --------------------------------------------------------------------- >> ---- This SF.net email is sponsored by: Microsoft Defy all >> challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Ssh-sftp-perl-users mailing list >> Ssh...@li... >> https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users >> > > DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |
From: Rajnikant <raj...@pe...> - 2008-05-26 09:24:28
|
Thanks Fredrik for your reply. After reading your reply I again tried debugging same issue, but still I'm facing same problem :(. But if I changed that 'If condition' as 'if(!defined ($sftp->get($remoteFilename,$localFilename))' then everything works fine. Which is the correct way to put condition in this case? Could you please share Perl version and unix flavor where you ran this test program? ~~~~~~~~~~~~~~~~~~~~ Thanks and Best regards, ~ Rajnikant Software Engg. Persistent Sys. Ltd. Ph. +91 98222 04088 -----Original Message----- From: Fredrik Stridfeldt [mailto:str...@gm...] Sent: Monday, May 26, 2008 1:22 PM To: raj...@pe... Subject: Re: [Ssh-sftp-perl-users] SFTP->get function failing Your sample works fine. [fredriks@REMOTEHOST]$ ls -l remote.txt -rw-r--r-- 1 fredriks fredriks 24 May 26 09:43 remote.txt [fredriksf@LOCALHOST ~]$ ls -l local.txt ls: local.txt: No such file or directory [fredriks@LOCALHOST ~]$ perl testftp.pl <---- (your sample) Get failed <--- (get failed not true) [fredriks@LOCALHOST ~]$ ls -l local.txt -rw-r--r-- 1 fredriks fredriks 24 May 26 09:43 local.txt -- my $err = $sftp->status(); # $err gets 0 value -- <- is not true /F On Mon, May 26, 2008 at 9:30 AM, <raj...@pe...> wrote: > Hello everyone, > > I'm studying SFTP. I have sample program to transfer files across two machines written in Perl. Some how my SFTP->get function is failing, but the file I'm trying to get from server is getting copied on client. > > Following is the code snipet: > #!/usr/bin/perl > use Net::SFTP; > > my $host = 'xx.yy.zz.aa'; > # User name and password > my %args = ( > "user", 'user1', > "password", 'password1' > ); > > my $localFilename = 'local.txt'; > my $remoteFilename = 'remote.txt'; > > # Creating the SFTP connection > my $sftp = Net::SFTP->new($host,%args); # sftp object and connection > get created successfully > > # Downloading file now > if(!$sftp->get($remoteFilename,$localFilename)) > { > my $err = $sftp->status(); # $err gets 0 value > print (" Get failed"); > } > > Do anyone have any clue why my get function is failing? > I'm using perl 5.8.6 on Fedora core 4. > > Thanks in advance. > > ~ Regards, > Rajnikant Jachak > > DISCLAIMER > ========== > This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. > > ---------------------------------------------------------------------- > --- This SF.net email is sponsored by: Microsoft Defy all challenges. > Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |
From: <raj...@pe...> - 2008-05-26 07:30:33
|
Hello everyone, I'm studying SFTP. I have sample program to transfer files across two machines written in Perl. Some how my SFTP->get function is failing, but the file I'm trying to get from server is getting copied on client. Following is the code snipet: #!/usr/bin/perl use Net::SFTP; my $host = 'xx.yy.zz.aa'; # User name and password my %args = ( "user", 'user1', "password", 'password1' ); my $localFilename = 'local.txt'; my $remoteFilename = 'remote.txt'; # Creating the SFTP connection my $sftp = Net::SFTP->new($host,%args); # sftp object and connection get created successfully # Downloading file now if(!$sftp->get($remoteFilename,$localFilename)) { my $err = $sftp->status(); # $err gets 0 value print (" Get failed"); } Do anyone have any clue why my get function is failing? I'm using perl 5.8.6 on Fedora core 4. Thanks in advance. ~ Regards, Rajnikant Jachak DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. |
From: Humphrey W. <h4...@gm...> - 2008-05-24 19:50:59
|
Have you installed latest PARI from: ftp://megrez.math.u-bordeaux.fr/pub/pari/unix/ Is it running on Solaris? 32 or 64bit? Hum.the.Benedict {at} gmail.com On Fri, May 23, 2008 at 11:34 PM, <moh...@wi...> wrote: > Hi All, > > > > I am getting the following error while building the MATH::pari package. I > tried number of ways like > > copying "paricfg.h" file in the directory /root/Math-Pari-2.010800/libPARI > . > > > > But still I am getting this error. Please help me to over come this. > > > > [root@testbrix Math-Pari-2.010800]# make test > > cd libPARI && make LIB="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" PREFIX="" > OPTIMIZE="-O2 -g -pipe -m64" PASTHRU_DEFINE="" PASTHRU_INC="" > > make[1]: Entering directory `/root/Math-Pari-2.010800/libPARI' > > make[1]: Leaving directory `/root/Math-Pari-2.010800/libPARI' > > make[1]: Entering directory `/root/Math-Pari-2.010800/libPARI' > > make[1]: Nothing to be done for `all'. > > make[1]: Leaving directory `/root/Math-Pari-2.010800/libPARI' > > PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" > "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t > > t/00_Pari............dubious > > Test returned status 0 (wstat 11, 0xb) > > DIED. FAILED tests 7, 57-546 > > Failed 491/546 tests, 10.07% okay > > t/55_analyz..........dubious > > Test returned status 0 (wstat 11, 0xb) > > DIED. FAILED tests 2-6 > > Failed 5/6 tests, 16.67% okay > > t/55_ellglobalred....open `t/../../pari-2.3.3/src/test/64/ellglobalred': No > such file or directory at test_eng/Testout.pm line 10. > > ...propagated at t/55_ellglobalred.t line 12. > > t/55_ellglobalred....dubious > > Test returned status 2 (wstat 512, 0x200) > > t/55_elliptic........ > > > > > > And please see what me to install MATH::PARI. > > I was trying to connect to ssh through perl, and perl code is > > > > #!/usr/bin/perl > > use strict; > > use Net::SSH::Perl; > > > > my $ssh = Net::SSH::Perl->new('10.207.12.235',debug => 1, protocol => > '2,1'); > > $ssh->login('gaurav','gaurav@123'); > > my ($stdout, $stderr, $exit) = $ssh->cmd('ps -ef | grep -v grep | grep > pmon'); > > > > print $stdout . "\n"; > > print $stderr . "\n"; > > print $exit . "\n"; > > > > [gaurav@testbrix Test]$ perl ss1.pl > > testbrix.wipro.com: Reading configuration data /home/gaurav/.ssh/config > > testbrix.wipro.com: Reading configuration data /etc/ssh_config > > testbrix.wipro.com: Connecting to 10.207.12.235, port 22. > > testbrix.wipro.com: Remote version string: SSH-1.99-OpenSSH_3.9p1 > > > > testbrix.wipro.com: Remote protocol version 1.99, remote software version > OpenSSH_3.9p1 > > Can't locate Math/Pari.pm in @INC (@INC contains: > /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 > /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi > /usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi > /usr/lib64/perl5/site_perl/5.8.3/x86_64-linux-thread-multi > /usr/lib64/perl5/site_perl/5.8.2/x86_64-linux-thread-multi > /usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-thread-multi > /usr/lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 > /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 > /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 > /usr/lib/perl5/site_perl > /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi > /usr/lib64/perl5/vendor_perl/5.8.4/x86_64-linux-thread-multi > /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi > /usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi > /usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi > /usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 > /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 > /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 > /usr/lib/perl5/vendor_perl .) at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util/SSH2MP.pm line 6. > > BEGIN failed--compilation aborted at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util/SSH2MP.pm line 6. > > Compilation failed in require at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util.pm line 56. > > BEGIN failed--compilation aborted at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex/DH1.pm line 10. > > Compilation failed in require at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex.pm line 6. > > BEGIN failed--compilation aborted at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex.pm line 6. > > Compilation failed in require at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/SSH2.pm line 6. > > BEGIN failed--compilation aborted at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/SSH2.pm line 6. > > Compilation failed in require at > /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl.pm line 54. > > > > Regards, > > Mustafa > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > > |
From: Ibrahim S. <sal...@gm...> - 2008-05-23 17:35:03
|
ssh: neutron2: Temporary failure in name resolution Couldn't read packet: Connection reset by peer i got this prob when i try to ssh to a host any ideas thanks in advance |
From: <moh...@wi...> - 2008-05-23 15:34:56
|
Hi All, I am getting the following error while building the MATH::pari package. I tried number of ways like copying "paricfg.h" file in the directory /root/Math-Pari-2.010800/libPARI . But still I am getting this error. Please help me to over come this. [root@testbrix Math-Pari-2.010800]# make test cd libPARI && make LIB="" LIBPERL_A="libperl.a" LINKTYPE="dynamic" PREFIX="" OPTIMIZE="-O2 -g -pipe -m64" PASTHRU_DEFINE="" PASTHRU_INC="" make[1]: Entering directory `/root/Math-Pari-2.010800/libPARI' make[1]: Leaving directory `/root/Math-Pari-2.010800/libPARI' make[1]: Entering directory `/root/Math-Pari-2.010800/libPARI' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/root/Math-Pari-2.010800/libPARI' PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00_Pari............dubious Test returned status 0 (wstat 11, 0xb) DIED. FAILED tests 7, 57-546 Failed 491/546 tests, 10.07% okay t/55_analyz..........dubious Test returned status 0 (wstat 11, 0xb) DIED. FAILED tests 2-6 Failed 5/6 tests, 16.67% okay t/55_ellglobalred....open `t/../../pari-2.3.3/src/test/64/ellglobalred': No such file or directory at test_eng/Testout.pm line 10. ...propagated at t/55_ellglobalred.t line 12. t/55_ellglobalred....dubious Test returned status 2 (wstat 512, 0x200) t/55_elliptic........ And please see what me to install MATH::PARI. I was trying to connect to ssh through perl, and perl code is #!/usr/bin/perl use strict; use Net::SSH::Perl; my $ssh = Net::SSH::Perl->new('10.207.12.235',debug => 1, protocol => '2,1'); $ssh->login('gaurav','gaurav@123'); my ($stdout, $stderr, $exit) = $ssh->cmd('ps -ef | grep -v grep | grep pmon'); print $stdout . "\n"; print $stderr . "\n"; print $exit . "\n"; [gaurav@testbrix Test]$ perl ss1.pl testbrix.wipro.com: Reading configuration data /home/gaurav/.ssh/config testbrix.wipro.com: Reading configuration data /etc/ssh_config testbrix.wipro.com: Connecting to 10.207.12.235, port 22. testbrix.wipro.com: Remote version string: SSH-1.99-OpenSSH_3.9p1 testbrix.wipro.com: Remote protocol version 1.99, remote software version OpenSSH_3.9p1 Can't locate Math/Pari.pm in @INC (@INC contains: /usr/lib64/perl5/5.8.5/x86_64-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib64/perl5/site_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/site_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.5/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.4/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.3/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.2/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.8.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl .) at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util/SSH2MP.pm line 6. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util/SSH2MP.pm line 6. Compilation failed in require at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Util.pm line 56. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex/DH1.pm line 10. Compilation failed in require at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex.pm line 6. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/Kex.pm line 6. Compilation failed in require at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/SSH2.pm line 6. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl/SSH2.pm line 6. Compilation failed in require at /usr/lib/perl5/site_perl/5.8.5/Net/SSH/Perl.pm line 54. Regards, Mustafa |
From: Ian D. <Ian...@bd...> - 2008-05-23 14:55:40
|
Are you installing on a Windows machine or a Linux machine? ________________________________ From: ssh...@li... [mailto:ssh...@li...] On Behalf Of Ibrahim Salloum Sent: 23 May 2008 15:51 To: ssh...@li... Subject: [Ssh-sftp-perl-users] help again please i stuckeced in installing HTML::Parser it gives me the following: CPAN.pm: Going to build G/GA/GAAS/HTML-Parser-3.56.tar.gz Checking if your kit is complete... Looks good Writing Makefile for HTML::Parser cp lib/HTML/PullParser.pm blib/lib/HTML/PullParser.pm cp Parser.pm blib/lib/HTML/Parser.pm cp lib/HTML/Entities.pm blib/lib/HTML/Entities.pm cp lib/HTML/TokeParser.pm blib/lib/HTML/TokeParser.pm cp lib/HTML/LinkExtor.pm blib/lib/HTML/LinkExtor.pm cp lib/HTML/HeadParser.pm blib/lib/HTML/HeadParser.pm cp lib/HTML/Filter.pm blib/lib/HTML/Filter.pm /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap Parser.xs > Parser.xsc && mv Parser.xsc Parser.c /usr/bin/perl mkhctype >hctype.h /usr/bin/perl mkpfunc >pfunc.h gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERSION=\"3.56\" -DXS_VERSION=\"3.56\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE" -DMARKED_SECTION Parser.c /bin/sh: gcc: command not found make: *** [Parser.o] Error 127 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible any idea thanks |
From: Ibrahim S. <sal...@gm...> - 2008-05-23 14:51:11
|
i stuckeced in installing HTML::Parser it gives me the following: CPAN.pm: Going to build G/GA/GAAS/HTML-Parser-3.56.tar.gz Checking if your kit is complete... Looks good Writing Makefile for HTML::Parser cp lib/HTML/PullParser.pm blib/lib/HTML/PullParser.pm cp Parser.pm blib/lib/HTML/Parser.pm cp lib/HTML/Entities.pm blib/lib/HTML/Entities.pm cp lib/HTML/TokeParser.pm blib/lib/HTML/TokeParser.pm cp lib/HTML/LinkExtor.pm blib/lib/HTML/LinkExtor.pm cp lib/HTML/HeadParser.pm blib/lib/HTML/HeadParser.pm cp lib/HTML/Filter.pm blib/lib/HTML/Filter.pm /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap Parser.xs > Parser.xsc && mv Parser.xsc Parser.c /usr/bin/perl mkhctype >hctype.h /usr/bin/perl mkpfunc >pfunc.h gcc -c -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -DVERSION=\"3.56\" -DXS_VERSION=\"3.56\" -fPIC "-I/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE" -DMARKED_SECTION Parser.c /bin/sh: gcc: command not found make: *** [Parser.o] Error 127 /usr/bin/make -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible any idea thanks |
From: <eri...@wa...> - 2008-05-23 14:40:58
|
I will be out of the office starting 05/22/2008 and will not return until 05/26/2008. I will respond to your message when I return. If its an emergency please contact Todd Hedrick, Bill Lockley, Don Boenitz, or Tim Delrose. If you need management escalation please contact Tom Mclaughlin. |
From: Eric L. <net...@er...> - 2008-05-23 14:38:19
|
Can always download it from here: http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-5.812.tar.gz Or depending on what distro you are running you can probably install it from a package. _____ From: ssh...@li... [mailto:ssh...@li...] On Behalf Of Ibrahim Salloum Sent: Friday, May 23, 2008 8:31 AM To: ssh...@li... Subject: [Ssh-sftp-perl-users] any help am facing this prob : perl -MCPAN -e shell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.90) ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?) i tried to install Bundle::CPAN it gives me LWP not available any idea?? how to instal LWP??? thanks in advance |
From: Ibrahim S. <sal...@gm...> - 2008-05-23 14:31:13
|
am facing this prob : perl -MCPAN -e shell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.90) ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?) i tried to install Bundle::CPAN it gives me LWP not available any idea?? how to instal LWP??? thanks in advance |
From: Ian D. <Ian...@bd...> - 2008-05-23 13:27:22
|
You don't say what distribution you use, but it will be via an rpm or other installer. For example on Fedora it is installed by yum install perl-CPAN Check your standard package installer for your distribution for more details. Regards Ian ________________________________ From: ssh...@li... [mailto:ssh...@li...] On Behalf Of Ibrahim Salloum Sent: 23 May 2008 14:00 To: ssh...@li... Subject: [Ssh-sftp-perl-users] CPAN problem please I want to install CPAN in my linux box , anyone could please tell me step by step how to do it???? thanks in advance |
From: Ibrahim S. <sal...@gm...> - 2008-05-23 13:00:27
|
I want to install CPAN in my linux box , anyone could please tell me step by step how to do it???? thanks in advance |
From: Jacob S. <tre...@re...> - 2008-05-14 22:36:00
|
I'm a pretty quiet member of this list and the list to sponge knowledge of SSH-Perl issues. Is this really the proper place to ask these questions? They have nothing to do about the module in which this list supports. Jacob Quoting Ibrahim Salloum <sal...@gm...>: > 1-how to write gz file into an array. > 2- how to write elements in an array without to delete it s contents > > > thanks in advance > |