ssh-sftp-perl-users Mailing List for Net::SSH and Net::SFTP - Perl modules (Page 30)
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: Stengel, R. <rol...@sa...> - 2005-06-27 12:52:41
|
Hi, I try to use Net::SSH on Windows XP, Perl 5.6.1. On opening a connection the Net::SSH::Perl.pm fails: P102414: Reading configuration data /.ssh/config P102414: Reading configuration data /etc/ssh_config P102414: Connecting to unix, port 22. P102414: Remote protocol version 1.99, remote software version OpenSSH_3.6p1 P102414: Net::SSH::Perl Version 1.28, protocol version 1.5. P102414: No compat match: OpenSSH_3.6p1. Can't set socket non-blocking: at C:/perl/site/lib/Net/SSH/Perl.pm line 216, <GEN0> line 1. I commented the blocking statement out # defined($sock->blocking(0)) # or die "Can't set socket non-blocking: $!"; And it worked then. I wonder, since the non-blocking mode should work on a system which struggles using threads.=20 I appreciate any help. Thanks Regards Roland CSN Component : XX-INT-TOOLS-JAPRO Team email address : DL_JAPRO_SUPPORT <mailto:DL_...@sa...>=20 |
From: Yishay W. <yis...@ho...> - 2005-06-22 06:58:46
|
These are the problems I encounter on win2k ActivePerl 5.8.7 using Net-SSH-Perl [1.23_01] when using fork(): For this code: =============================== use Net::SSH::W32Perl; use strict; my $user = 'user'; my $password = 'password'; my $fileName = "~$user/dummy_file2"; my $ssh = createSsh(); my $i = 1; while (1) { print "starting...\n"; runInLoop(); print "sleeping 10\n"; sleep 10; print "finished iteration ".$i++."\n"; } sub isRunning { my $ssh = shift; my ($out, $err, $exit) = $ssh->cmd("ls $fileName"); # print "out: $out\nerr: $err\nexit: $exit\n"; return !$err && $out; } sub createSsh { my $time = time(); my $ssh = Net::SSH::W32Perl->new('host'); $ssh->login($user, $password); print "ssh created after ", time() - $time, "\n"; return $ssh; } sub runInLoop { my $time = time(); my ($out, $err, $exit) = $ssh->cmd("rm $fileName"); if (isRunning($ssh) ) { print "error removing $fileName\n"; return; } my $ssh2 = createSsh(); unless (my $pid = fork() ) { startAction($ssh2); while (1) {} } else { print "out of command after ", time - $time, "\n"; my $isRunning = isRunning($ssh); sleep 5; kill (9, $pid); while (time() - $time < 60) { last if ($isRunning = isRunning($ssh) ); } my $howlong = time() - $time; if ($isRunning) { print "start was successful after $howlong\n"; } else { print "failed after $howlong\n"; } } } sub startAction { my $ssh2 = shift; my $cmd = "sleep 20; touch $fileName; sleep 60; "; print "executing cmd: $cmd\n"; my ($out, $err, $exit) = $ssh2->cmd($cmd); } ======================== I get: ======================== C:\yishay>perl test_fork.pl ssh created after 2 starting... ssh created after 0 out of command after 1 executing cmd: sleep 20; touch ~yishayw/dummy_file2; sleep 60; Bad packet length 1927540882 at C:/Perl/site/lib/Net/SSH/Perl/Packet.pm line 171 Bad packet length 1523729943 at C:/Perl/site/lib/Net/SSH/Perl/Packet.pm line 171 C:\yishay>perl test_fork.pl ssh created after 0 starting... ssh created after 0 out of command after 1 executing cmd: sleep 20; touch ~yishayw/dummy_file2; sleep 60; Corrupted MAC on input at C:/Perl/site/lib/Net/SSH/Perl/Packet.pm line 189 Corrupted MAC on input at C:/Perl/site/lib/Net/SSH/Perl/Packet.pm line 189 ===================================== similar problems happen when using threads instead of fork(). Note that the same code appears to work fine on WinXP for fork(), but not using threads. I also tried using alarm signals on both platforms and did not get the desired results - alarm just didn't seem to go off. So my conclusion is: for non-blocking operations on windows using Net::SSH::Perl you can use fork() on XP but there's no solution for win2K. If anyone cares to challenge that assumption she'd be most welcome. Thanks, Yishay >From: "Yishay Weiss" <yis...@ho...> >To: ssh...@li... >Subject: [Ssh-sftp-perl-users] are net::ssh::perl and net::sftp considered >thread safe? >Date: Sun, 19 Jun 2005 09:22:38 +0000 > >Hi, > >In order to use net::ssh::perl and net::sftp in a non blocking fashion I'm >considering using them with threads. I first would like to know if it's >considered safe. I'm using perl 5.8 on windows. > >I already tried using fork() for the same purpose but encountered some >problems on win2k. I would sometimes get an error message. I can't >currently reconstruct the problem I had with fork(). I might give more >precise info in a separate post. I was only wondering if anyone's tried >using threads for this purpose or if a different non-fork() solution >exists. Using expect.pm seems like overkill for me, anyway it appears to >just be a variation of the fork() solution if I'm correct. > >Thanks, >Yishay > >_________________________________________________________________ >Dont just search. Find. Check out the new MSN Search! >http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > >------------------------------------------------------- >SF.Net email is sponsored by: Discover Easy Linux Migration Strategies >from IBM. Find simple to follow Roadmaps, straightforward articles, >informative Webcasts and more! Get everything you need to get up to >speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click >_______________________________________________ >Ssh-sftp-perl-users mailing list >Ssh...@li... >https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users _________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee® Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 |
From: Mark S. <ms...@de...> - 2005-06-20 08:53:52
|
Aloha does the module grade me the possibility to build a tunnel. something like: "someone@somehost -L LPORT:REMOTE:RPORT" i have "played" this the login call, but i can't get it to run. with regrads Mark Strasheim ---------------------------------------------------------------------- definitiv! business applications GmbH & Co. KG Fresnostrasse 14 - 18 · DE-48159 Münster Tel. +49 (0) 251 21092 - 23 · Fax +49 (0) 251 21092 - 29 <mailto:ms...@de...> mailto:ms...@de... · <http://www.definitiv-ba.de/> http://www.definitiv-ba.de ---------------------------------------------------------------------- |
From: Yishay W. <yis...@ho...> - 2005-06-19 09:22:45
|
Hi, In order to use net::ssh::perl and net::sftp in a non blocking fashion I'm considering using them with threads. I first would like to know if it's considered safe. I'm using perl 5.8 on windows. I already tried using fork() for the same purpose but encountered some problems on win2k. I would sometimes get an error message. I can't currently reconstruct the problem I had with fork(). I might give more precise info in a separate post. I was only wondering if anyone's tried using threads for this purpose or if a different non-fork() solution exists. Using expect.pm seems like overkill for me, anyway it appears to just be a variation of the fork() solution if I'm correct. Thanks, Yishay _________________________________________________________________ Dont just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ |
From: Robert L. <rla...@ao...> - 2005-06-17 14:54:36
|
On Fri, Jun 17, 2005 at 02:23:45PM +0200, Marcel Siebers wrote: > When sending exactly 100 files the sftp.pm module is doing fine, but wh= en I try > to send 101 files or more it??s giving the following errors: >=20 > =A0 >=20 > Couldn't get handle: Failure at /usr/lib/perl5/site_perl/5.8.0/Net/SFTP= .pm line > 166. >=20 I'm no expert on SFTP, but this looks like a configuration problem on the server. The get_handle method (line ~150) is getting a response from the remote side and status isn't coming back correctly. =20 I'm afraid I can't be of anymore help. I've never used SFTP and never configured a daemon for it. You could try keeping track of the files sent, and closing and reopening the connection, as a workaround anyway. I bet that would solve the probl= em. Rob --=20 Robert Landrum Systems Programmer |
From: Cali <cit...@in...> - 2005-06-15 14:34:44
|
ssh...@li... wrote: > Send Ssh-sftp-perl-users mailing list submissions to > ssh...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > or, via email, send a message with subject or body 'help' to > ssh...@li... > > You can reach the person managing the list at > ssh...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Ssh-sftp-perl-users digest..." > > > Today's Topics: > > 1. using Net::SSH::Config (shift8) > > --__--__-- > > Message: 1 > From: shift8 <sh...@di...> > To: ssh...@li... > Date: Tue, 14 Jun 2005 15:10:33 -0700 > Subject: [Ssh-sftp-perl-users] using Net::SSH::Config > > hi all - new to these parts. quick question: is there any way to use > Net::SSH::Config in combination with Net::SFTP? i'm searching the > archives now, but though i'd throw this out there jic. > > thanks in advance, > -s > > > > > --__--__-- > > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > > > End of Ssh-sftp-perl-users Digest Yes, u can use Net::SSH::Config in combination with Net::SFTP, with Config u can manipulate the configuration file, that SFTP uses. I hope this help. |
From: shift8 <sh...@di...> - 2005-06-14 22:07:38
|
hi all - new to these parts. quick question: is there any way to use Net::SSH::Config in combination with Net::SFTP? i'm searching the archives now, but though i'd throw this out there jic. thanks in advance, -s |
From: Aradon S. <ar...@gm...> - 2005-06-13 18:29:51
|
I've decided that I would try out the Net::SSH::Perl module and have thusly installed it through CPAN I am just trying to connect to an SSH server and have put in the login and password in manually but it seems it never get's to that point. What occurs is is get's to the "Trying empty user-authentication request." and then it comes back with "Connection closed by remote host. at /usr/../site_perl/5.8.5/Net/SSH/Perl/AuthMgr.pm line 142" At that point in the code there are the following variables: $class: Net::SSH::Perl::Packet $SSH : Net::SSH::Perl::SSH2=3DHASH(0x12762c) $Sock: GLOB(0x552914) $len : 0 Now of course it goes out cause len is 0 but I can't seem to make it not 0. Is this something on the script side or is the SSH server not doing something it should be doing? Any help would be appriciated. Below is the sections of code effected: sub send_auth_none { my $amgr =3D shift; my $ssh =3D $amgr->{ssh}; $ssh->debug("Trying empty user-authentication request."); my $packet =3D $ssh->packet_start(SSH2_MSG_USERAUTH_REQUEST); $packet->put_str($ssh->config->get('user')); $packet->put_str("ssh-connection"); $packet->put_str("none"); $packet->send; } sub read { my $class =3D shift; my $ssh =3D shift; my $sock =3D $ssh->sock; while (1) { if (my $packet =3D $class->read_poll($ssh)) { return $packet; } my $s =3D IO::Select->new( $sock ); my @ready =3D $s->can_read; my $buf; print "----Info----\n$class\n$ssh\n$sock\n"; my $len =3D sysread $sock, $buf, 8192; print $len, "\n"; croak "Connection closed by remote host." if $len =3D=3D 0; if (!defined $len) { next if $! =3D=3D EAGAIN || $! =3D=3D EWOULDBLOCK; croak "Read from socket failed: $!"; } ## Untaint data read from sshd. This is binary data, ## so there's nothing to taint-check against/for. ($buf) =3D $buf =3D~ /(.*)/s; $ssh->incoming_data->append($buf); } } |
From: <gd...@te...> - 2005-06-13 15:24:46
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hello, I've sent a mail to this list about two month ago, concerning a socket bind problem. I'm a bit surprised nobody got concerne about this problem, the first time, so I tought I might ask again. I made a script that connects to different computers via ssh. basically, all the computer's ip are in a file, my script reads the file, gets the ip adresse, connects via ssh, loops and get the next ip from the file. First connection works fine, but when it's time to connect to the next one, I get a message saying : Net::SSH:can't bind on socket to port 1023 when I do a netstat, I see the connection is up for about a minute then disappears. has anybody done a multi ssh connection script who hasn't come up with this problem ? here's part of my code: use strict; use Net::SSH::Perl; my ($patchurl,$stout,$sterr,$exit,$ssh); my @ids = "$ENV{HOME}/.ssh/id_rsa"; my %params = ( 'protocol' => 2, 'identity_files' => \@ids, ); $patchurl = push @ARGV open HOSTS, "hosts" or die "je n'ai pas réussi à ouvrir le fichier hosts : $!"; while(<HOSTS>){ (...) $ssh = Net::SSH::Perl->new($_, %params); $ssh->login("root"); ($stout,$sterr,$exit) = $ssh->cmd("wget -q $patchurl"); (...) } -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCraWFwU9DjvfD8u4RAjPvAJ9+PrXNwJoRfU63kJMtKdvM1lSOUgCfRI56 hKJkEMFqMj3QnjxTMaeV1oI= =EQSB -----END PGP SIGNATURE----- |
From: Mark A. <mar...@sh...> - 2005-05-31 16:50:11
|
Yes, you're right, that would be a better way to handle $@. Actually, Jim sent me a little code snippet in a private mail which implements the script's eval block in the fashion you suggest. Cheers, --Mark=20 -----Original Message----- From: Mark A. Fuller [mailto:mar...@ea...]=20 Sent: Tuesday, May 31, 2005 10:55 AM To: Mark Allen; Jim Lane; ssh...@li... Subject: RE: [Ssh-sftp-perl-users] How to stop "error conditions" from terminating a script. From: Mark Allen <mar...@sh...> > > eval { =20 > $sftp =3D Net::SFTP->new($host,%args); > }; > if ( $@ ) { > warn "sftp error: $@\n"; > # get next host > } For what it's worth: a couple years ago I thought I saw a condition where multiple failures occured within the eval. I couldn't count on $@ containing the pertinent (meaningful) text for the failure. That's why the eval examples I posted back then included a signal catcher within the eval to capture the $@ text and add it to an array. After the eval, I could test if my array contained > 0 entries and emit all the entries in my warn output.=20 Maybe the maintainer can comment on whether that's possible. But, I definitely remember a situation where something like a put/get was failing and I was not getting the real message in $@. Getting control on die and capturing $@ into an array indicated it died multiple times and the first time was the one that had the meaningful message. Hope that helps, Mark |
From: Mark A. F. <mar...@ea...> - 2005-05-31 15:55:12
|
From: Mark Allen <mar...@sh...> > > eval { > $sftp = Net::SFTP->new($host,%args); > }; > if ( $@ ) { > warn "sftp error: $@\n"; > # get next host > } For what it's worth: a couple years ago I thought I saw a condition where multiple failures occured within the eval. I couldn't count on $@ containing the pertinent (meaningful) text for the failure. That's why the eval examples I posted back then included a signal catcher within the eval to capture the $@ text and add it to an array. After the eval, I could test if my array contained > 0 entries and emit all the entries in my warn output. Maybe the maintainer can comment on whether that's possible. But, I definitely remember a situation where something like a put/get was failing and I was not getting the real message in $@. Getting control on die and capturing $@ into an array indicated it died multiple times and the first time was the one that had the meaningful message. Hope that helps, Mark |
From: Mark A. <mar...@sh...> - 2005-05-31 14:30:20
|
I don't know what your attempted eval block looked like, but I don't know why this wouldn't work... =20 $args{user} =3D $account; $args{password} =3D $password; my $sftp; eval { =20 $sftp =3D Net::SFTP->new($host,%args); }; if ( $@ ) { warn "sftp error: $@\n"; # get next host } if ( $sftp ) { ... } else { warn "$sftp was false.\n"; # get next host } -----Original Message----- From: ssh...@li... [mailto:ssh...@li...] On Behalf Of Jim Lane Sent: Tuesday, May 31, 2005 7:09 AM To: ssh...@li... Subject: [Ssh-sftp-perl-users] How to stop "error conditions" from terminating a script. Hi, All I have an application that uses a table of hostnames, accounts and passwords to copy data from a set of remote servers using either FTP or SFTP as the case may be. I'm trying to write a check script that will use this table and determine whether the hosts can be contacted and if the file is available. I'm running into problems with Net::SFTP because some conditions (e.g. Expired password) are treated as errors and the script terminates at that point. I'd like to be able to trap and note the error and continue on. My logic looks like this: $args{user} =3D $account; $args{password} =3D $password; if ($sftp =3D Net::SFTP->new($host,%args)) { If for any reason the Net::SFTP->new doesn't work the whole script craps out with messages of the form: Connection closed at /home/jlane/bin/check line 41 I've seen earlier posts on this list about wrapping an eval around code to deal with errors but that doesn't seem to work for me. HELP! =20 Jim Lane =20 Capacity Planner =20 Rogers Shared Operations =20 (905)-513-3164 =20 FAX (905)-513-5012 =20 Jim...@rc... =20 ------------------------------------------------------- This SF.Net email is sponsored by Yahoo. Introducing Yahoo! Search Developer Network - Create apps using Yahoo! Search APIs Find out how you can build Yahoo! directly into your own Applications - visit = http://developer.yahoo.net/?fr=3Dfad-ysdn-ostg-q22005 _______________________________________________ Ssh-sftp-perl-users mailing list Ssh...@li... https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users |
From: Mark A. F. <mar...@ea...> - 2005-05-31 14:22:34
|
From: Jim Lane <Jim...@rc...> >I've seen earlier posts on this list about wrapping an eval around code >to deal with errors but that doesn't seem to work for me. The reason it doesn't work for you is because you've got the piece of SSH code nested within an "if" statement? Can you change your logic to perform the SSH code within an eval, testing the results after? Mark |
From: Jim L. <Jim...@rc...> - 2005-05-31 12:08:56
|
Hi, All I have an application that uses a table of hostnames, accounts and passwords to copy data from a set of remote servers using either FTP or SFTP as the case may be. I'm trying to write a check script that will use this table and determine whether the hosts can be contacted and if the file is available. I'm running into problems with Net::SFTP because some conditions (e.g. Expired password) are treated as errors and the script terminates at that point. I'd like to be able to trap and note the error and continue on. My logic looks like this: $args{user} =3D $account; $args{password} =3D $password; if ($sftp =3D Net::SFTP->new($host,%args)) { If for any reason the Net::SFTP->new doesn't work the whole script craps out with messages of the form: Connection closed at /home/jlane/bin/check line 41 I've seen earlier posts on this list about wrapping an eval around code to deal with errors but that doesn't seem to work for me. HELP! =20 Jim Lane =20 Capacity Planner =20 Rogers Shared Operations =20 (905)-513-3164 =20 FAX (905)-513-5012 =20 Jim...@rc... =20 |
From: Cali <cit...@in...> - 2005-05-25 16:21:54
|
I'm trying to setup a connection, and in some host i did but in others i can´t. This is my script: use Net::SSH::Perl; use Net::SFTP; my $host = "xxxxx"; my $identity = $ENV{HOME}."/.ssh/id_rsa"; my %params = (debug =>1, # identity_files =>[$identity], options =>["HostbasedAuthentication no","PasswordAuthentication no","PubkeyAuthentication no"], protocol => '2' # port => 80 ); #my %args = ( # 'user' => 'xxxxxx', # 'password' => 'xxxxxx', # 'debug' => '1', # 'ssh_args' => ["HostbasedAuthentication yes","PasswordAuthentication yes"] #); #my $sftp = Net::SFTP->new($host,%args); #$sftp->put("yo.txt", "/home/cguerrero/yo.txt"); my $cfg = Net::SSH::Perl::Config->new($host); $cfg->read_config("/etc/ssh_config"); $cfg->merge_directive("PubkeyAuthentication no"); my $ssh = Net::SSH::Perl->new($host,%params); $ssh->login('xxxxx','xxxx'); my ($stdout, $stderr, $exit) = $ssh->cmd("mkdir kali"); warn ("error performing command: $command ($stderr)") if ($exit); print $stdout; print "Envio archivo"; exit; And this is what i get on the screen: cluster1 sftp # perl sftp.pl cluster1: Reading configuration data /root/.ssh/config cluster1: Reading configuration data /etc/ssh_config cluster1: Allocated local port 1023. cluster1: Connecting to 10.22.6.90, port 22. cluster1: Remote protocol version 2.0, remote software version OpenSSH_3.8.1p1 Debian 1:3.8.1p1-11ubuntu3.1 cluster1: Net::SSH::Perl Version 1.25, protocol version 2.0. cluster1: No compat match: OpenSSH_3.8.1p1 Debian 1:3.8.1p1-11ubuntu3.1. cluster1: Connection established. cluster1: Sent key-exchange init (KEXINIT), wait response. cluster1: Algorithms, c->s: 3des-cbc hmac-sha1 none cluster1: Algorithms, s->c: 3des-cbc hmac-sha1 none cluster1: Entering Diffie-Hellman Group 1 key exchange. cluster1: Sent DH public key, waiting for reply. cluster1: Received host key, type 'ssh-dss'. cluster1: Host '10.22.6.90' is known and matches the host key. cluster1: Computing shared secret key. cluster1: Verifying server signature. cluster1: Waiting for NEWKEYS message. cluster1: Enabling incoming encryption/MAC/compression. cluster1: Send NEWKEYS, enable outgoing encryption/MAC/compression. cluster1: Sending request for user-authentication service. cluster1: Service accepted: ssh-userauth. cluster1: Trying empty user-authentication request. cluster1: Authentication methods that can continue: publickey,keyboard-interactive. cluster1: Next method to try is publickey. Permission denied at sftp.pl line 25 Any idea???? thanx |
From: Lazar, A. <al...@md...> - 2005-05-24 21:08:46
|
Did nobody encounter this problem? -----Original Message----- From: Lazar, Adrian=20 Sent: Thursday, May 19, 2005 11:32 AM To: ssh...@li... Subject: Problems Reading Received Data? Hello, I am having problems reading received SSH data on Win32. I don't understand= why this works in Linux but not on Windows. The command (uname -a; echo a = > test) is sent successfully to the server. However, it looks like the code= gets stuck in SSH2::client_loop and no input from the server is received. = Did anybody encounter this problem?=20 The only difference between this code and the one that I run on Linux is th= at I use Net::SSH::W32Perl on Windows instead of Net::SSH::Perl. Here's the code and what happens: test.pl: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D use Net::SSH::W32Perl; my $host =3D '<IP_ADDR>'; my $ssh =3D new Net::SSH::W32Perl($host, port=3D>22, debug=3D>1); $ssh->login('<USER>', '<PASS>'); my ($out, $err, $exit) =3D $ssh->cmd('uname -a; echo a > test'); print("Out: $out\n"); print("Err: $err\n"); print("Exit: $exit\n"); Output on Win32 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D PC1593: Reading configuration data C:\CVS/.ssh/config PC1593: Reading configuration data /etc/ssh_config PC1593: Connecting to <IP_ADDR>, port 22. PC1593: Socket created, turning on blocking... PC1593: Remote protocol version 1.99, remote software version OpenSSH_3.9p1 PC1593: Net::SSH::Perl Version 1.23, protocol version 2.0. PC1593: No compat match: OpenSSH_3.9p1. PC1593: Connection established. PC1593: Sent key-exchange init (KEXINIT), wait response. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x3443b94)->get_str PC1593: Algorithms, c->s: 3des-cbc hmac-sha1 none PC1593: Algorithms, s->c: 3des-cbc hmac-sha1 none PC1593: Entering Diffie-Hellman Group 1 key exchange. PC1593: Sent DH public key, waiting for reply. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x321ad3c)->get_str PC1593: Received host key, type 'ssh-dss'. PC1593: Host '<IP_ADDR>' is known and matches the host key. PC1593: Computing shared secret key. PC1593: Verifying server signature. PC1593: Waiting for NEWKEYS message. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x351162c)->get_str PC1593: Enabling incoming encryption/MAC/compression. PC1593: Send NEWKEYS, enable outgoing encryption/MAC/compression. PC1593: Sending request for user-authentication service. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x3443cfc)->get_str PC1593: Service accepted: ssh-userauth. PC1593: Trying empty user-authentication request. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x34b3314)->get_str PC1593: Authentication methods that can continue: publickey,password,keyboa= rd-interactive. PC1593: Next method to try is publickey. PC1593: Next method to try is password. PC1593: Trying password authentication. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x321ac1c)->get_str PC1593: Login completed, opening dummy shell channel. PC1593: channel 0: new [client-session] PC1593: Requesting channel_open for channel 0. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x353ac50)->get_str PC1593: channel 0: open confirm rwindow 0 rmax 32768 PC1593: Got channel open confirmation, requesting shell. PC1593: Requesting service shell on channel 0. PC1593: channel 1: new [client-session] PC1593: Requesting channel_open for channel 1. PC1593: Entering interactive session. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x353fb30)->get_str SSH2::client_loop: GOT A PACKET? SSH2::client_loop: Packet Type: Net::SSH::Perl::Packet=3DHASH(0x353fb30)->= type SSH2::client_loop second while SSH2::client_loop buf: =F2T?=C5{9?,?V?r??=F1?=E1D=A3??=DC?=D6?=F9?=DC6Qf= =E5?=A2=B5=AA?u=BF)?=EE???????=F3?a Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x353fb18)->get_str SSH2::client_loop: GOT A PACKET? SSH2::client_loop: Packet Type: Net::SSH::Perl::Packet=3DHASH(0x353fb18)->= type PC1593: Sending command: uname -a; echo a > test PC1593: Requesting service exec on channel 1. PC1593: channel 1: open confirm rwindow 0 rmax 32768 SSH2::client_loop second while SSH2::client_loop buf: oj???=F3u2=B1?=F4?Z??\??n1(=E4??!???J?????,RW??=EB)= =E7=E0) SSH2::client_loop: GOT A PACKET? SSH2::client_loop: Packet Type: Net::SSH::Perl::Packet=3DHASH(0x1beed18)->= type SSH2::client_loop second while Terminating on signal SIGINT(2) On Linux the program executes and terminates as expected. The command is se= nt to the server and the server's input is received (uname -a data). Does a= nybody know what's happening and how this can be fixed? I'm using perl 5.8.6. Thanks, Adrian |
From: Lazar, A. <al...@md...> - 2005-05-19 18:32:35
|
Hello, I am having problems reading received SSH data on Win32. I don't understand= why this works in Linux but not on Windows. The command (uname -a; echo a = > test) is sent successfully to the server. However, it looks like the code= gets stuck in SSH2::client_loop and no input from the server is received. = Did anybody encounter this problem?=20 The only difference between this code and the one that I run on Linux is th= at I use Net::SSH::W32Perl on Windows instead of Net::SSH::Perl. Here's the code and what happens: test.pl: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D use Net::SSH::W32Perl; my $host =3D '<IP_ADDR>'; my $ssh =3D new Net::SSH::W32Perl($host, port=3D>22, debug=3D>1); $ssh->login('<USER>', '<PASS>'); my ($out, $err, $exit) =3D $ssh->cmd('uname -a; echo a > test'); print("Out: $out\n"); print("Err: $err\n"); print("Exit: $exit\n"); Output on Win32 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D PC1593: Reading configuration data C:\CVS/.ssh/config PC1593: Reading configuration data /etc/ssh_config PC1593: Connecting to <IP_ADDR>, port 22. PC1593: Socket created, turning on blocking... PC1593: Remote protocol version 1.99, remote software version OpenSSH_3.9p1 PC1593: Net::SSH::Perl Version 1.23, protocol version 2.0. PC1593: No compat match: OpenSSH_3.9p1. PC1593: Connection established. PC1593: Sent key-exchange init (KEXINIT), wait response. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x3443b94)->get_str PC1593: Algorithms, c->s: 3des-cbc hmac-sha1 none PC1593: Algorithms, s->c: 3des-cbc hmac-sha1 none PC1593: Entering Diffie-Hellman Group 1 key exchange. PC1593: Sent DH public key, waiting for reply. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x321ad3c)->get_str PC1593: Received host key, type 'ssh-dss'. PC1593: Host '<IP_ADDR>' is known and matches the host key. PC1593: Computing shared secret key. PC1593: Verifying server signature. PC1593: Waiting for NEWKEYS message. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x351162c)->get_str PC1593: Enabling incoming encryption/MAC/compression. PC1593: Send NEWKEYS, enable outgoing encryption/MAC/compression. PC1593: Sending request for user-authentication service. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x3443cfc)->get_str PC1593: Service accepted: ssh-userauth. PC1593: Trying empty user-authentication request. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x34b3314)->get_str PC1593: Authentication methods that can continue: publickey,password,keyboa= rd-interactive. PC1593: Next method to try is publickey. PC1593: Next method to try is password. PC1593: Trying password authentication. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x321ac1c)->get_str PC1593: Login completed, opening dummy shell channel. PC1593: channel 0: new [client-session] PC1593: Requesting channel_open for channel 0. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x353ac50)->get_str PC1593: channel 0: open confirm rwindow 0 rmax 32768 PC1593: Got channel open confirmation, requesting shell. PC1593: Requesting service shell on channel 0. PC1593: channel 1: new [client-session] PC1593: Requesting channel_open for channel 1. PC1593: Entering interactive session. Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x353fb30)->get_str SSH2::client_loop: GOT A PACKET? SSH2::client_loop: Packet Type: Net::SSH::Perl::Packet=3DHASH(0x353fb30)->= type SSH2::client_loop second while SSH2::client_loop buf: =F2T?=C5{9?,?V?r??=F1?=E1D=A3??=DC?=D6?=F9?=DC6Qf= =E5?=A2=B5=AA?u=BF)?=EE???????=F3?a Remote Packet: Net::SSH::Perl::Packet=3DHASH(0x353fb18)->get_str SSH2::client_loop: GOT A PACKET? SSH2::client_loop: Packet Type: Net::SSH::Perl::Packet=3DHASH(0x353fb18)->= type PC1593: Sending command: uname -a; echo a > test PC1593: Requesting service exec on channel 1. PC1593: channel 1: open confirm rwindow 0 rmax 32768 SSH2::client_loop second while SSH2::client_loop buf: oj???=F3u2=B1?=F4?Z??\??n1(=E4??!???J?????,RW??=EB)= =E7=E0) SSH2::client_loop: GOT A PACKET? SSH2::client_loop: Packet Type: Net::SSH::Perl::Packet=3DHASH(0x1beed18)->= type SSH2::client_loop second while Terminating on signal SIGINT(2) On Linux the program executes and terminates as expected. The command is se= nt to the server and the server's input is received (uname -a data). Does a= nybody know what's happening and how this can be fixed? I'm using perl 5.8.6. Thanks, Adrian |
From: David R. <dbr...@cp...> - 2005-05-19 00:53:13
|
Two small fixes: (1) should hopefully fix the complaint about a non-existant 'blocking' method in IO::Handle (I don't see the problem on any of my machines); thanks to "Dan". (2) fixes connections to servers that output extraneous data before the SSH version line (F-SECURE server in this case); thanks to Neal Ley. Thanks, -- Dave Isa. 40:31 |
From: Robert L. <rla...@ao...> - 2005-05-18 18:05:55
|
On Wed, May 18, 2005 at 09:14:52AM -0700, CG wrote: > Recently, I've been getting > > Deep recursion on subroutine Net::SSH::Perl::Packet::read_poll at > /usr/lib/perl5/site_perl/5.8.2/Net/SSH/Perl/Packet.pm line 100. > > when I attempt to transfer multiple large files using Net::SFTP... > > Any ideas off the bat? > This is a warning issued when a sub recurses more than 100 times. If you turn off warnings, it goes away. As to the cause, I bet that the client is having difficulty reading from the socket for long periods of time during the transfer. I haven't actually looked at the code. Rob -- Robert Landrum Systems Programmer |
From: CG <cg...@ya...> - 2005-05-18 16:15:03
|
Recently, I've been getting Deep recursion on subroutine Net::SSH::Perl::Packet::read_poll at /usr/lib/perl5/site_perl/5.8.2/Net/SSH/Perl/Packet.pm line 100. when I attempt to transfer multiple large files using Net::SFTP... Any ideas off the bat? What information do you need from me to troubleshoot the problem? CG Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html |
From: Salvador F. <sfa...@ya...> - 2005-05-03 18:14:31
|
Hi, I have uploaded Net::SFTP::Foreign to CPAN. It's a modified version of Net::SFTP that, instead of Net::SSH::Perl, uses an external ssh command (i.e. OpenSSH) to establish the connection to the server. Compared to Net::SFTP, Net::SFTP::Foreign - doesn't require any other module to work, just an external ssh command - integrates seamless on environments where an ssh infrastructure has already been deployed - can use trusted ssh implementations like OpenSSH for the transport layer on the other hand, Net::SFTP::Foreign - does not allow using text passwords for authentication - creates a new ssh process which could use more resources than the in process pure perl implementation on Net::SSH::Perl, though this is largely OS dependent. - and I don't know how it will work on non Unix like OSs as Windows. Comments and suggestions welcome, BTW, I have also uploaded to CPAN LWP::Protocol::sftp, an adaptation layer between Net::SFTP::Foreign and LWP. Cheers, - Salvador __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: David R. <dbr...@cp...> - 2005-04-30 19:46:17
|
I've been fairly busy moving lately but am now back online and am of course still interested in fixing and improving Net::SSH::Perl and Net::SFTP. I'm going back through the archives and bugs logged on rt.cpan.org and will continue to work on fixes/updates. My apologies if any direct mails to me bounced over the last month. Thanks, -- Dave Isa. 40:31 |
From: Merijn B. <me...@il...> - 2005-04-29 12:14:24
|
Quoting ThoSi (pe...@th...): > Hi Folks > > I want to use Net:SSH::Perl to automatically run some commands on several > hosts. All the hostnames are stored in a database. > > I decided to use Net::SSH::Perl because I can configure everything I need. > The auth is done by a SSH-Key (RSA). Unfortunately not all of the hosts in the DB have > the SSH Key stored in their ~/.ssh/authorized_keys. When I try to connect to one of > these hosts using SSH2, my script dies because of a Carp::croak() call in the > Net::SSH::Perl::AuthMgr module (line 142). > > Is there a way to turn off this "die" and just get a error-message instead? > If a hosts doesn't have this ssh-key, I don't want to abort my script, I wnat to continue with > the next hostname instead. > wrap your call in an eval {} construct like so : eval { my $ssh = Net::SSH::Perl->new($host); $ssh->login($user); my($stdout, $stderr, $exit) = $ssh->cmd($cmd); } if ($@) { warn "Could not connect to $host because of [$@]\n"; } Hope this helps, -- Merijn Broeren | She doesn't want you to understand her. She knows that's Software Geek | impossible. She just wants you to understand yourself, | everything else is negotiable. |
From: ThoSi <pe...@th...> - 2005-04-29 10:52:08
|
Hi Folks I want to use Net:SSH::Perl to automatically run some commands on = several=20 hosts. All the hostnames are stored in a database. I decided to use Net::SSH::Perl because I can configure everything I = need.=20 The auth is done by a SSH-Key (RSA). Unfortunately not all of the hosts = in the DB have=20 the SSH Key stored in their ~/.ssh/authorized_keys. When I try to = connect to one of=20 these hosts using SSH2, my script dies because of a Carp::croak() call = in the Net::SSH::Perl::AuthMgr module (line 142). Is there a way to turn off this "die" and just get a error-message = instead?=20 If a hosts doesn't have this ssh-key, I don't want to abort my script, I = wnat to continue with=20 the next hostname instead. Thanks in advance --Thomas |
From: Lazar, A. <al...@md...> - 2005-04-28 16:05:36
|
Hello, I was wondering if anybody knows of a fix for the above mentioned bug or if= there's a patch in working?=20 Thanks, Adrian Lazar MDSI Mobile Data Solutions Inc. 10271 Shellbridge Way Richmond, BC Canada V6X 2W8 Telephone: 604-207-6312 Facsimile: 604-207-6060 Email: al...@md... http://www.mdsi-advantex.com=20 |