ssh-sftp-perl-users Mailing List for Net::SSH and Net::SFTP - Perl modules
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: Tech S. <su...@vo...> - 2018-06-13 13:42:30
|
All; I am using the Net::SFTP v0.012 and Net::SSH::Perl v2.14 modules on a CentOS 6 server. I wrote a small test script to login to a remote server, put a small test file, and log out. Simple enough. My problem is that when the script logins in to the remote server, I am getting the following warning: "Use of uninitialized value $_[0] in pack at /opt/perl/site/lib/Net/SSH/Perl/Buffer.pm line 107". Since I have to distribute my final script to several users, I really need to figure out what I am missing. Any insight at all would be greatly appreciated. Here is my test script. #!/usr/bin/env perl use Net::SFTP; my %args = ( ); $args{ user } = 'testuser'; $args{ password } = 'QX9mvDLMXDTKqQqN'; $args{ debug } = '1'; $args{ warn } = '0'; my $host = 'backup_server'; my $file = 'notes.txt'; my $path = '/home/backups/testuser'; my $sftp = Net::SFTP->new( $host, %args ); my $handle = $sftp->do_open( $path ); $sftp->put( $file, $file ); $sftp->do_close( $handle ); exit; Thanks; John V. |
From: Rick B. <rbo...@as...> - 2018-03-20 12:04:40
|
I'm trying to port some perl code from Linux to Windows and ran into a problem with Net::SFTP. One script that uses sftp to connect to an outside data source is giving me this error message: No matching mac found: client hma...@op...,hma...@op...,hmac-sha2-512,hmac-sha2-256 server hmac-sha1,hmac-md5,hmac-md5-96,hmac-sha1-96,hmac-sha256,hma...@ss... Given that I have no control over the server end of this and no realistic hope of having that end changed, is there something I can do at my client end to add MAC algorithms so that I can get a match? Thanks Please note that MESCA Freight Services is now Ascent Global Logistics. Learn more about Ascent Global Logistics at www.ascentgl.com<http://www.ascentgl.com/>. Please also note my new email address. [1492612735782_ascentlogo.jpg] Rick Bonnett Programmer Analyst Ascent Global Logistics Office: 207.620.8670 P.O. Box 1039 Augusta, ME 04332 <https://drive.google.com/uc?id=0B6c1aTLfpRD6OHFVOWw2WUQ1bDg> [https://ci4.googleusercontent.com/proxy/KSd1y52khHv9agmQvrCbryrM-2fW2_TTiv_ZyM7g8CvIOy1lLeiL98i21qwjj_AtIcK1gmFVa_3klKcL84Nn9soPAtkHRj9nuToKZ86G2yoOSEHDRVJtmcoMmxPmmaYL9i1otg=s0-d-e1-ft#http://cdn2.hubspot.net/hubfs/184235/dev_images/signature_app/facebook_si] <https://twitter.com/ascent_global> [https://ci6.googleusercontent.com/proxy/Sh-8YmBCXXgMOdOoPgPtgPnKQjxnBXcEwel_xmwS_cHPKRztClUPBPiJEHPdtG3Hei5hccBS7ONl-N_UCmjOHpHCwBzTomOq7BWdwmxz1KhrziiqbYJgeX4FOXOOh5DEqF8y=s0-d-e1-ft#http://cdn2.hubspot.net/hubfs/184235/dev_images/signature_app/twitter_sig.p] <https://www.linkedin.com/company/15249966?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A15249966%2Cidx%3A2-1-2%2CtarId%3A1484246260345%2Ctas%3Aascent%20global%20logistics> [https://ci5.googleusercontent.com/proxy/hzQ50OystqOxlKMduZD32nQoNlmY4n_0V4lxPUWy5nU5cr1gbQR-03vxhbJL7qRILyM-QnaRbLIvZIoxOof999Ep266X82hDAOK2K4jC9rBUhUVgcslhZQ1jOUHJwKu2s6_4sA=s0-d-e1-ft#http://cdn2.hubspot.net/hubfs/184235/dev_images/signature_app/linkedin_si] <https://www.linkedin.com/company/15249966> Your Partner for Peak Logistics Performance The information transmitted is intended only for the person or entity to which it is addressed and may contain proprietary, business-confidential and/or privileged material. If you are not the intended recipient of this message you are hereby notified that any use, review, retransmission, dissemination, distribution, reproduction or any action taken in reliance upon this message is prohibited. If you received this in error, please contact the sender and delete the material from any computer. |
From: Votava, C. (N. - US) <cra...@no...> - 2016-10-07 19:41:38
|
Folks- More and more you will start seeing this error message when trying to connect to upgraded ssh hosts via Net::SSH::Perl: XS_Tk__Callback_Call error:Protocol error: expected packet type 91, got 80 at /opt/exp/perl/perl5.8/lib/site_perl/5.8.8/Net/SSH/Perl/Packet.pm line 222 This is due to some new changes made in the updated sshd servers. I needed to fix this quickly, and documented my debugging & workaround here: http://www.perlmonks.org/?node_id=1144748 Basically, I ended up changing the following code (in Red): .../Net/SSH/Perl/Packet.pm: 217 sub read_expect { 218 my $class = shift; 219 my($ssh, $type) = @_; 220 my $pack = $class->read($ssh); 221 while($pack->type == 80) { # CMV Hack start vvvv 222 print STDERR "IGNORING GLOBAL MESSAGE..."; 223 $pack = $class->read($ssh); 224 print STDERR " NEXT MESSAGE IS: ", $pack->type, "\n"; 225 } # CMV Hack end ^^^^ 226 if ($pack->type != $type) { 227 $ssh->fatal_disconnect(sprintf 228 "Protocol error: expected packet type %d, got %d", 229 $type, $pack->type); 230 } 231 $pack; 232 } I wanted to announce this to the list, and see if anybody has a better workaround. If not, can we get this in the distribution? Thanks -Craig |
From: Dennison W. <den...@ra...> - 2016-07-22 17:18:03
|
Hello all, When running the following: my $ssh = Net::SSH::Perl->new($host, 'port' => $port); $ssh->login($username); I get the following error: Can't locate loadable object for module Crypt::OpenSSH::ChachaPoly in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at /usr/local/lib/perl/5.14.2/Net/SSH/Perl/Cipher/ChachaPoly.pm line 14 Compilation failed in require at /usr/local/lib/perl/5.14.2/Net/SSH/Perl/Cipher.pm line 58. This is against Net::SSH::Perl 2.01 on Debian Wheezy 7.11 I'm looking for advice on how to resolve this error. Thanks, Dennison |
From: Ray M. <ram...@al...> - 2015-11-17 14:48:59
|
I see Lance Kinley added support for modern ciphers like the AES family for Net::SSH:Perl. Mgiht that be pulled to the CPAN distribution of the module? https://github.com/lkinley/Net-SSH-Perl [http://www.alertlogic.com/images/ESign-Alert%20Logic-Logo.png]<http://www.alertlogic.com/> Ray Morris | Vulnerability Developer C: +1 979.599.4065 | ram...@al... | alertlogic.com<http://www.alertlogic.com/> Confidentiality Notice | This email and any included attachments may be privileged, confidential and/or otherwise protected from disclosure. Access to this email by anyone other than the intended recipient is unauthorized. If you believe you have received this email in error, please contact the sender immediately and delete all copies. If you are not the intended recipient, you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. |
From: Julio T. <jto...@fo...> - 2014-08-22 19:52:06
|
Hi All: I am using perl module Net-SSH-Perl but have a little problem: each time I call cmd, a connection/disconnection takes place, even forcing version 2. The problem is that I have to take decisions based on the ouput of each command, so I can not concatenate them with “;”. The ssh server is a tiny Mikrotik router and I don’t want to use much CPU with multiple ssh athentications. Here is my code (working fine but with multiple connections/disconnections) #!/usr/bin/perl use strict; use IO::Socket; use IO::Handle; use Net::SSH::Perl; my $username = "admin"; my $passwd = "marcos"; my $host = "192.168.1.40"; my %params = ( 'privileged'=> 0, 'protocol' => 2, 'port' => 2202, ); my $ssh = Net::SSH::Perl->new($host, %params); $ssh->login($username, $passwd); my $resp = &cambiarplan("1425","997k","1997k","247k","497k"); print "$resp"; sub cambiarplan { my $idcliente="$_[0]"; my $drate="$_[1]"; my $dmaxrate="$_[2]"; my $urate="$_[3]"; my $umaxrate="$_[4]"; my ($stdout, $stderr, $exit) = $ssh->cmd(":put [queue tree find packet-mark=cliente$idcliente-bajada]"); if ($exit) {return $stderr}; if ($stdout eq "\r\n") {return "cola de bajada no encontrada\n"}; ($stdout, $stderr, $exit) = $ssh->cmd(":put [queue tree find packet-mark=cliente$idcliente-subida]"); if ($exit) {return $stderr}; if ($stdout eq "\r\n") {return "cola de subida no encontrada\n"}; ($stdout, $stderr, $exit) = $ssh->cmd("queue tree set [find packet-mark=cliente$idcliente-bajada] limit=$drate max-limit=$dmaxrate"); if ($exit) {return $stderr}; if (not($stdout eq "")) {return $stdout}; ($stdout, $stderr, $exit) = $ssh->cmd("queue tree set [find packet-mark=cliente$idcliente-subida] limit=$urate max-limit=$umaxrate"); if ($exit) {return $stderr}; if (not($stdout eq "")) {return $stdout}; return "OK\n"; } According to module documentation it is possible to run multiple commands con the same connection. Am I doing something wrong? Thanks in advance, Julio |
From: Salvador F. <sfa...@ya...> - 2014-01-15 20:23:48
|
>________________________________ > From: Tim Pushor <tim...@yo...> >To: ssh...@li... >Sent: Wednesday, January 15, 2014 4:32 PM >Subject: [Ssh-sftp-perl-users] ERROR:SFTP->put died: Couldn't fsetstat: Permission denied > > > >Hello list, > > >Using Net::SFTP 0.10 to automate transferring files to one of our vendors has produced this error: > > >SFTP->put died: Couldn't fsetstat: Permission denied > Maybe you could switch to Net::SFTP::Foreign which provides support for such server behaviour via the late_set_perm and best_effort options or just dissabling the permission copying setting copy_perm to 0 |
From: Tim P. <tim...@yo...> - 2014-01-15 19:09:10
|
Ok so I wrote this quite a while ago and after going through the code have a better handle on whats going on. Initially I was getting warnings in the put method, so I trap warnings and change them to die's, then run $sftp->put inside an eval. So the warning about changing the attribute was being changed to a die, and made it appear that it was dying. So - I've changed the warn handler to not do that, but it still spits out a warning every time. I'd like to ignore this particular warning, while still trapping others so my original question still remains - is there an elegant way to accomplish this? I can think of hacks to check the warning inside a handler for the string but that still doesn't future proof my code as the string may change. -- Tim Pushor York Electronics Ltd. Information Technology Phone: 403.207.0202 x243 Mobile: 403.978.6502 |
From: Nigel R. <ni...@sy...> - 2014-01-15 17:22:45
|
Maybe you need to use Net::SFTP::Attributes to change the permissions. $attrs->perm( [ $value ] ) Get/set the value of the permissions in $attrs. From: Tim Pushor [mailto:tim...@yo...] Sent: Wednesday, January 15, 2014 9:33 AM To: ssh...@li... Subject: [Ssh-sftp-perl-users] ERROR:SFTP->put died: Couldn't fsetstat: Permission denied Hello list, Using Net::SFTP 0.10 to automate transferring files to one of our vendors has produced this error: SFTP->put died: Couldn't fsetstat: Permission denied I've commented out the $sftp->do_fsetstat($handle,$a) line from SFTP.pm and the file goes. I believe this is due to the overly restrictive environment our vendor has set up. I didn't look too close but it looks like the fsetstat is trying to set the file permission bits to 0777. Is there any way to perhaps get an option put into this module to be able to disable this behavior? I do not want to leave the system like this as module upgrades will break the script again. I can't be the only one that will trip over this. Thank you, -- Tim Pushor York Electronics Ltd. Information Technology Phone: 403.207.0202 x243 Mobile: 403.978.6502 |
From: Tim P. <tim...@yo...> - 2014-01-15 17:16:16
|
Hi Nigel, Thanks for responding but I can't see where that would work. in the ->put method it looks like it takes the file attributes from the local file via stat, and tries to set at least some of them (uid/gid?) on the remote file after transferring. I don't see a way to override this behavior as a lowly module user. I would like the capability to turn this off. This is the code in question: my @stat = stat $local or croak "Can't stat local $local: $!"; my $size = $stat[7]; my $a = Net::SFTP::Attributes->new(Stat => \@stat); my $flags = $a->flags; $flags &= ~SSH2_FILEXFER_ATTR_SIZE; $flags &= ~SSH2_FILEXFER_ATTR_UIDGID; $a->flags($flags); $a->perm( $a->perm & 0777 ); ... do transfer ... $sftp->do_fsetstat($handle, $a); *<- This fails* $sftp->do_close($handle); return 1; I'm not sure exactly what its trying to set, but looks like at least UID/GID and perhaps setting perms to 0777. The remote server does not allow this, and the command line sftp client does not seem to do this. On 1/15/2014 10:04 AM, Nigel Reed wrote: > > Maybe you need to use Net::SFTP::Attributes to change the permissions. > > $attrs->perm( [ $value ] ) > > Get/set the value of the permissions in $attrs. > > *From:*Tim Pushor [mailto:tim...@yo...] > *Sent:* Wednesday, January 15, 2014 9:33 AM > *To:* ssh...@li... > *Subject:* [Ssh-sftp-perl-users] ERROR:SFTP->put died: Couldn't > fsetstat: Permission denied > > Hello list, > > Using Net::SFTP 0.10 to automate transferring files to one of our > vendors has produced this error: > > SFTP->put died: Couldn't fsetstat: Permission denied > > I've commented out the $sftp->do_fsetstat($handle,$a) line from > SFTP.pm and the file goes. I believe this is due to the overly > restrictive environment our vendor has set up. I didn't look too close > but it looks like the fsetstat is trying to set the file permission > bits to 0777. > > Is there any way to perhaps get an option put into this module to be > able to disable this behavior? I do not want to leave the system like > this as module upgrades will break the script again. I can't be the > only one that will trip over this. > > Thank you, > > -- > > Tim Pushor > > York Electronics Ltd. > > Information Technology > > Phone: 403.207.0202 x243 > > Mobile: 403.978.6502 > -- Tim Pushor York Electronics Ltd. Information Technology Phone: 403.207.0202 x243 Mobile: 403.978.6502 |
From: Tim P. <tim...@yo...> - 2014-01-15 17:16:08
|
------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk |
From: Tim P. <tim...@yo...> - 2014-01-15 15:47:43
|
Hello list, Using Net::SFTP 0.10 to automate transferring files to one of our vendors has produced this error: SFTP->put died: Couldn't fsetstat: Permission denied I've commented out the $sftp->do_fsetstat($handle,$a) line from SFTP.pm and the file goes. I believe this is due to the overly restrictive environment our vendor has set up. I didn't look too close but it looks like the fsetstat is trying to set the file permission bits to 0777. Is there any way to perhaps get an option put into this module to be able to disable this behavior? I do not want to leave the system like this as module upgrades will break the script again. I can't be the only one that will trip over this. Thank you, -- Tim Pushor York Electronics Ltd. Information Technology Phone: 403.207.0202 x243 Mobile: 403.978.6502 |
From: Fernando B. <fb...@cr...> - 2013-11-14 17:26:43
|
Nothing... I tested with chrome and firefox. And if I use: print "123"; It show on the browser OK Thats not a problem too Thanks again!! 2013/11/14 Nigel Reed <ni...@sy...> > Not sure why it would just hang, looking at the script you should get a > 500 error, unless you taken some bits out. There’s no content type so the > browser will take the first line of input and not know what to do with it. > What browser are you using? > > > > Try adding > > > > print “Content-type: text/plain”; > > > > before any other output and see if that helps. > > > > *From:* Fernando Buzon [mailto:fb...@cr...] > *Sent:* Thursday, November 14, 2013 10:38 AM > *To:* ssh...@li... > *Subject:* Re: [Ssh-sftp-perl-users] problem with CGI > > > > Thanks friend! > But it is not my problem. > > If I execute a cmd that no returns nothing in stdout, it works. > > example: > > > > my $cmd = "svn --help"; > > (Page never load...) > > > > my $cmd = "svn --help > /dev/null"; > > (Page load OK and fast) > > > > > > And like I said, at command line both cases works nice. > The problem is execute a cmd that returns anything to stdout page neve > load and after a time get time out. > > > > 2013/11/14 Nigel Reed <ni...@sy...> > > Have a look at this thread. > > > > http://www.tek-tips.com/viewthread.cfm?qid=1140435 > > > > *From:* Fernando Buzon [mailto:fb...@cr...] > *Sent:* Thursday, November 14, 2013 5:36 AM > *To:* ssh...@li... > *Subject:* [Ssh-sftp-perl-users] problem with CGI > > > > Hi guys. > > My script don't work in apache. > > > > look this: > > > > > > =================================================================== > > #!/usr/bin/perl > > > > > > use CGI; > > use HTTP::Request::Common qw(POST); > > use Net::SSH::Perl; > > use DateTime; > > use warnings; > > use strict; > > > > > > my $user = 'user'; > > my $pass = 'pass'; > > my $cmd = "svn --help"; > > my $ssh = Net::SSH::Perl->new('10.10.1.1'); > > $ssh->login($user, $pass); > > my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); > > > > if ($stdout) > > { > > print "stdout -> " . $stdout . "\n"; > > } > > else > > { > > print "stderr -> " . $stderr . "\n"; > > } > > print "exit -> " . $exit . "\n"; > > =================================================================== > > > > At line command this is ok but executing in apache the page never load... > Still loading page until time out. > > What's the problem? > help-me... > > Thanks! > > > |
From: Nigel R. <ni...@sy...> - 2013-11-14 17:15:58
|
Not sure why it would just hang, looking at the script you should get a 500 error, unless you taken some bits out. There's no content type so the browser will take the first line of input and not know what to do with it. What browser are you using? Try adding print "Content-type: text/plain"; before any other output and see if that helps. From: Fernando Buzon [mailto:fb...@cr...] Sent: Thursday, November 14, 2013 10:38 AM To: ssh...@li... Subject: Re: [Ssh-sftp-perl-users] problem with CGI Thanks friend! But it is not my problem. If I execute a cmd that no returns nothing in stdout, it works. example: my $cmd = "svn --help"; (Page never load...) my $cmd = "svn --help > /dev/null"; (Page load OK and fast) And like I said, at command line both cases works nice. The problem is execute a cmd that returns anything to stdout page neve load and after a time get time out. 2013/11/14 Nigel Reed <ni...@sy...> Have a look at this thread. http://www.tek-tips.com/viewthread.cfm?qid=1140435 From: Fernando Buzon [mailto:fb...@cr...] Sent: Thursday, November 14, 2013 5:36 AM To: ssh...@li... Subject: [Ssh-sftp-perl-users] problem with CGI Hi guys. My script don't work in apache. look this: =================================================================== #!/usr/bin/perl use CGI; use HTTP::Request::Common qw(POST); use Net::SSH::Perl; use DateTime; use warnings; use strict; my $user = 'user'; my $pass = 'pass'; my $cmd = "svn --help"; my $ssh = Net::SSH::Perl->new('10.10.1.1'); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); if ($stdout) { print "stdout -> " . $stdout . "\n"; } else { print "stderr -> " . $stderr . "\n"; } print "exit -> " . $exit . "\n"; =================================================================== At line command this is ok but executing in apache the page never load... Still loading page until time out. What's the problem? help-me... Thanks! |
From: Fernando B. <fb...@cr...> - 2013-11-14 16:37:48
|
Thanks friend! But it is not my problem. If I execute a cmd that no returns nothing in stdout, it works. example: my $cmd = "svn --help"; (Page never load...) my $cmd = "svn --help > /dev/null"; (Page load OK and fast) And like I said, at command line both cases works nice. The problem is execute a cmd that returns anything to stdout page neve load and after a time get time out. 2013/11/14 Nigel Reed <ni...@sy...> > Have a look at this thread. > > > > http://www.tek-tips.com/viewthread.cfm?qid=1140435 > > > > *From:* Fernando Buzon [mailto:fb...@cr...] > *Sent:* Thursday, November 14, 2013 5:36 AM > *To:* ssh...@li... > *Subject:* [Ssh-sftp-perl-users] problem with CGI > > > > Hi guys. > > My script don't work in apache. > > > > look this: > > > > > > =================================================================== > > #!/usr/bin/perl > > > > > > use CGI; > > use HTTP::Request::Common qw(POST); > > use Net::SSH::Perl; > > use DateTime; > > use warnings; > > use strict; > > > > > > my $user = 'user'; > > my $pass = 'pass'; > > my $cmd = "svn --help"; > > my $ssh = Net::SSH::Perl->new('10.10.1.1'); > > $ssh->login($user, $pass); > > my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); > > > > if ($stdout) > > { > > print "stdout -> " . $stdout . "\n"; > > } > > else > > { > > print "stderr -> " . $stderr . "\n"; > > } > > print "exit -> " . $exit . "\n"; > > =================================================================== > > > > At line command this is ok but executing in apache the page never load... > Still loading page until time out. > > What's the problem? > help-me... > > Thanks! > |
From: Nigel R. <ni...@sy...> - 2013-11-14 16:28:25
|
Have a look at this thread. http://www.tek-tips.com/viewthread.cfm?qid=1140435 From: Fernando Buzon [mailto:fb...@cr...] Sent: Thursday, November 14, 2013 5:36 AM To: ssh...@li... Subject: [Ssh-sftp-perl-users] problem with CGI Hi guys. My script don't work in apache. look this: =================================================================== #!/usr/bin/perl use CGI; use HTTP::Request::Common qw(POST); use Net::SSH::Perl; use DateTime; use warnings; use strict; my $user = 'user'; my $pass = 'pass'; my $cmd = "svn --help"; my $ssh = Net::SSH::Perl->new('10.10.1.1'); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); if ($stdout) { print "stdout -> " . $stdout . "\n"; } else { print "stderr -> " . $stderr . "\n"; } print "exit -> " . $exit . "\n"; =================================================================== At line command this is ok but executing in apache the page never load... Still loading page until time out. What's the problem? help-me... Thanks! |
From: Fernando B. <fb...@cr...> - 2013-11-14 11:59:12
|
Hi guys. My script don't work in apache. look this: =================================================================== #!/usr/bin/perl use CGI; use HTTP::Request::Common qw(POST); use Net::SSH::Perl; use DateTime; use warnings; use strict; my $user = 'user'; my $pass = 'pass'; my $cmd = "svn --help"; my $ssh = Net::SSH::Perl->new('10.10.1.1'); $ssh->login($user, $pass); my($stdout, $stderr, $exit) = $ssh->cmd("$cmd"); if ($stdout) { print "stdout -> " . $stdout . "\n"; } else { print "stderr -> " . $stderr . "\n"; } print "exit -> " . $exit . "\n"; =================================================================== At line command this is ok but executing in apache the page never load... Still loading page until time out. What's the problem? help-me... Thanks! |
From: אייל ב. <eya...@gm...> - 2013-08-31 17:22:38
|
Hello all, I try to execute the sample code "cmd.pl" that came with this module and located at /eg. This is the relevant part: my $ssh = Net::SSH::Perl->new($host || $this_host, debug => 1, options => ["PubkeyAuthentication no"]); My problem is - no matter what i tried, it is always trying PubKey Authentication first and Password Authentication second. BTW, when i run the command "ssh -o PubKeyAuthentication=no -v 'hostname'" it is skipping the PubKey Authentication and goes directly to the Password Authentication. Any suggestions? Thanks, Eyal |
From: Salvador F. <sfa...@ya...> - 2013-07-30 13:30:17
|
>I am trying to use Net::SSH2 for authentication with a client server app. I see client side example. Any server side examples? Net::SSH2/libssh2 implements only the client side. |
From: MATTHEWS, M. <mm...@at...> - 2013-07-30 12:31:14
|
I am trying to use Net::SSH2 for authentication with a client server app. I see client side example. Any server side examples? thanks -- Michael Matthews AT&T Network Management Operational Support When requesting support from the CWM/ISC/CNOTE/NETMAN team for severity 2 and non-outtage issues please submit a TROUT ticket: http://atsemsatticket.web.att.com For severity 1/outtage issues contact the on-duty person via duty site: http://webapps.asi.sbc.com:8086/duty/schedule/duty.jsp?id=78 and also submit TROUT ticket to: http://atsemsatticket.web.att.com |
From: Vivian Z. <vi...@gm...> - 2013-07-21 02:10:26
|
http://jydsktagteknik.dk/plszzjat/toos.nmrr vinoyun 7/21/2013 3:10:08 AM |
From: James P. <jam...@op...> - 2013-06-11 05:04:40
|
On Mon, Jun 10, 2013, at 05:03 PM, Ryan, Martin G wrote: > Le 10 juin 2013 à 12:40, James Patterson <jam...@op...> a > écrit : > > > The problem seems to occur when the command being executed is longer > > than about 22000 characters. > > > > I've uploaded a simplified version of the script - that only does an > > echo - to pastebin: > > http://pastebin.com/NtFmkvZz > > > > Forgive me if I've got the wrong end of stick, but you look to me to be > sending 50,000 periods as a command. > > Would you not expect that to fail? > > Did you mean > > $cmd .= "."x50000; yes. > > instead of; > > $cmd = "."x50000; > > (not that I'm sure that 50,000 periods after "echo " is going to fly real > well either) > > Regards, > Martin > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users -- http://www.fastmail.fm - Same, same, but different... |
From: Ryan, M. G <Mar...@te...> - 2013-06-11 00:03:37
|
Le 10 juin 2013 à 12:40, James Patterson <jam...@op...> a écrit : > The problem seems to occur when the command being executed is longer > than about 22000 characters. > > I've uploaded a simplified version of the script - that only does an > echo - to pastebin: > http://pastebin.com/NtFmkvZz > Forgive me if I've got the wrong end of stick, but you look to me to be sending 50,000 periods as a command. Would you not expect that to fail? Did you mean $cmd .= "."x50000; instead of; $cmd = "."x50000; (not that I'm sure that 50,000 periods after "echo " is going to fly real well either) Regards, Martin |
From: Thierry C. <thi...@gm...> - 2013-06-10 18:08:50
|
I am not sure it is the same bug we have experienced, but it looks similar. I had worked a little bit to solve this bug, but the slight improvements I have produced wasn't enough, and I don't even proposed its to the maintainer. tcpdump shouldn't give you a lot of information, I am afraid, but you could find something with the debug options. From what I have seen, the protocol is not fully implanted (the rsh inside the tunnel, I mean). The problem with Net::SSH::Perl is that it doesn't evolve anymore. Now, I use Net::Openssh. It is not a pure Perl module, but it is a very nice wrapper, efficient, with all the functions I loved in Net::SSH::Perl. It doesn't needed too much dependencies, and it doesn't have this stupid bug. Sorry, it doesn't help. Thierry Le 10 juin 2013 à 12:40, James Patterson <jam...@op...> a écrit : > I have a script that connects to a server and checks if a list of rpms > are installed. On some servers this hangs, on others it works fine. > > The problem seems to occur when the command being executed is longer > than about 22000 characters. > > I've uploaded a simplified version of the script - that only does an > echo - to pastebin: > http://pastebin.com/NtFmkvZz > > I am running Net::SSH::Perl 1.34-9 on RHEL6.4 > > Next I'll bring out tcpdump next, and look at what is common between the > failing servers, but I first wanted to ask if anyone had any suggestions > or ideas? > > -- > James Patterson > jam...@op... > > -- > http://www.fastmail.fm - IMAP accessible web-mail > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users |
From: Ivaylo T. <iva...@gm...> - 2013-06-10 16:52:06
|
On Mon, Jun 10, 2013 at 1:38 PM, James Patterson < jam...@op...> wrote: > I have a script that connects to a server and checks if a list of rpms > are installed. On some servers this hangs, on others it works fine. > > The problem seems to occur when the command being executed is longer > than about 22000 characters. > > I've uploaded a simplified version of the script - that only does an > echo - to pastebin: > http://pastebin.com/NtFmkvZz > > I am running Net::SSH::Perl 1.34-9 on RHEL6.4 > > Next I'll bring out tcpdump next, and look at what is common between the > failing servers, but I first wanted to ask if anyone had any suggestions > or ideas? > > -- > James Patterson > jam...@op... > > -- > http://www.fastmail.fm - IMAP accessible web-mail > > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > |