ssh-sftp-perl-users Mailing List for Net::SSH and Net::SFTP - Perl modules (Page 10)
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: monnappa a. <mon...@gm...> - 2008-11-20 20:15:31
|
Hi, As per your advice i changed the code to this ---------------------------------------------------------------------------------- #!/usr/bin/perl -w use strict; #use Term::ReadKey; use Net::SSH2; my $ssh2 = Net::SSH2->new(); print "connect fail\n" unless ($ssh2->connect('sys5')); print "password fail\n" unless ($ssh2->auth_keyboard(xyz','mypass'))); my $buf; my $chan = $ssh2->channel(); $chan->shell(); print $chan "uname -a\n"; select(undef,undef,undef,0.2); my $out = ""; $out .= $buf while ((my $len = $chan->read($buf, 1000)) > 0); print $out; --------------------------------------------------------------------------------------------------- When i run this script, i still don't get any output., am i doing anything wrong.........can u kindly help me with this..........any links or mailing lists which can solve this problem would be appreciated Thanks, Monnappa On Thu, Nov 20, 2008 at 3:27 AM, Stewart Rounds <sar...@us...> wrote: > monnappa appaiah wrote: > -snip- > >> my $chan = $ssh2->channel(); >> $chan->shell(); >> print $chan "uname -a\n"; >> print "LINE: $_" while <$chan>; >> print $chan "who\n"; >> print "LINE: $_" while <$chan>; >> $chan->close; >> > > Hi. > > The 'print "LINE: $_" while <$chan>;' doesn't work for me either. > Instead, you need to monitor the channel's read buffer, like: > > select(undef,undef,undef,0.2); > $out = ""; > $out .= $buf while (($len = $chan->read($buf,512)) > 0); > print $out; > > You can find examples of this online in various places. You > may have to add some sort of timeout or a loop to ensure that > you read all that is to be read before moving on. > > I hope this helps. > > -Stewart Rounds > U.S. Geological Survey > |
From: monnappa a. <mon...@gm...> - 2008-11-19 20:25:34
|
Hi All, I have written 2 codes using "Net::SSH2" module which will connect to remote machine (linux), execute commands and give me the output...i'm running the script on my windows machine (win xp)......The problem is when i run this script i don't get any ouput and i also don't get any error.....can somebody help me wat shud i do to get the output?....I'm not sure if i'm missing something. both the scripts are shown below: ---------------------------------------------------------------------------- 1) #!/usr/bin/perl -w use strict; use Net::SSH2; my $ssh2 = Net::SSH2->new(); $ssh2->connect('10.10.10.5') or die "Unable to connect host $@ \n"; $ssh2->auth_password('xyz','mypass'); my $chan = $ssh2->channel(); $chan->exec('ls -la'); while (<$chan>) {print} ------------------------------------------------------------------------------------- 2) #!/usr/bin/perl -w use strict; use Net::SSH2; my $ssh2 = Net::SSH2->new(); print "connect fail\n" unless ($ssh2->connect('sys5')); print "password fail\n" unless ($ssh2->auth_keyboard('xyz','mypass')); my $chan = $ssh2->channel(); $chan->shell(); print $chan "uname -a\n"; print "LINE: $_" while <$chan>; print $chan "who\n"; print "LINE: $_" while <$chan>; $chan->close; -------------------------------------------------------------------- Thanks, Monnappa |
From: Henry B. <Hen...@in...> - 2008-11-11 19:46:32
|
Hello all, FYI and the record: my solution was to change to using Net::SSH2::SFTP. Regards, Henry On Tuesday, November 04 2008 09:31 am, Henry Baragar wrote: > Hello all, > > I have an application that runs fine from the command line, but produces > the following error when run under cron: > > input must be 8 bytes long > at /usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/C > rypt/DES.pm line 57 > > This is being run under: > SUSE Linux version 2.6.16.27-0.6-smp > perl v5.8.8 built for x86_64-linux-thread-multi > $Net::SFTP::VERSION: 0.10 > $Net::SSH::Perl::VERSION: 1.30 > > The code is fairly simple: > > sub deliver { > my $self = shift; > my ($host,$directory,%cred) = $self->parse_address; > my $sftp = Net::SFTP->new($host, %cred); > my $path = $directory . $self->file_name; > my $flags = SSH2_FXF_WRITE | SSH2_FXF_CREAT | SSH2_FXF_TRUNC; > my $handle = $sftp->do_open($path, $flags); > $sftp->do_write($handle,0,$self->payload); > $sftp->do_close($handle); > # return value not used > } > > Any suggestions on how to fix this problem? > > Regards, > Henry > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & win > great prizes Grand prize is a trip for two to an Open Source event anywhere > in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users |
From: Kevin M. <kmc...@ba...> - 2008-11-11 01:07:42
|
I think if you install the Math::BigInt::GMP module the connection should speedup. It's been a while since I had a similar problem, but after installing that my speed issues went away. -Kevin Roberto Salazar M. wrote: > > Regards: > > > > I’m sorry my english. > > > > I install Net-SSH-Perl version 1.33 (perl 5.8.5, centos 4.6), but I > have problems with ssh version 2, when the host try to connect to > other host, this is very slow (it delays approximately > > 1 minute). This does not happen with ssh version 1, the conection is > very fast. What’s is the problem? > > > > TKS > > Roberto > > > > > ------------------------------------------------------------------------ > Color coding for safety: Windows Live Hotmail alerts you to suspicious > email. Sign up today. > <http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_safety_112008> > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > Ssh-sftp-perl-users mailing list > Ssh...@li... > https://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users > |
From: Roberto S. M. <rcs...@ho...> - 2008-11-10 23:13:28
|
Regards: I’m sorry my english. I install Net-SSH-Perl version 1.33 (perl 5.8.5, centos 4.6), but I have problems with ssh version 2, when the host try to connect to other host, this is very slow (it delays approximately 1 minute). This does not happen with ssh version 1, the conection is very fast. What’s is the problem? TKS Roberto _________________________________________________________________ Color coding for safety: Windows Live Hotmail alerts you to suspicious email. http://windowslive.com/Explore/Hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_safety_112008 |
From: Henry B. <Hen...@in...> - 2008-11-04 14:31:32
|
Hello all, I have an application that runs fine from the command line, but produces the following error when run under cron: input must be 8 bytes long at /usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/C rypt/DES.pm line 57 This is being run under: SUSE Linux version 2.6.16.27-0.6-smp perl v5.8.8 built for x86_64-linux-thread-multi $Net::SFTP::VERSION: 0.10 $Net::SSH::Perl::VERSION: 1.30 The code is fairly simple: sub deliver { my $self = shift; my ($host,$directory,%cred) = $self->parse_address; my $sftp = Net::SFTP->new($host, %cred); my $path = $directory . $self->file_name; my $flags = SSH2_FXF_WRITE | SSH2_FXF_CREAT | SSH2_FXF_TRUNC; my $handle = $sftp->do_open($path, $flags); $sftp->do_write($handle,0,$self->payload); $sftp->do_close($handle); # return value not used } Any suggestions on how to fix this problem? Regards, Henry |
From: Greg S. M. <gr...@en...> - 2008-10-21 17:47:57
|
> Starting with version 1.31 I have not been able to get either the shell > method or the pssh application to run correctly. I fixed this problem this morning and just released version 1.33 to CPAN. Please raise a bug at rt.cpan.org if the problem still occurs. I also added support for hashed known_hosts files for those wondering about that. -- Greg Sabino Mullane gr...@en... End Point Corporation |
From: Kevin M. <kmc...@ba...> - 2008-10-20 17:27:57
|
Starting with version 1.31 I have not been able to get either the shell method or the pssh application to run correctly. I cannot get an interactive shell to work, Net::SSH::Perl disconnects almost immediately after authentication has been completed. Running a remote command however, is successful. I have tried on a variety of solaris and linux servers so far, all with the same result: Verbose Output for INTERACTIVE SHELL: USERNAME@whippet ~ $ ./pssh -v SERVER whippet: Reading configuration data /home/USERNAME/.ssh/config whippet: Reading configuration data /etc/ssh_config whippet: Connecting to SERVER, port 22. whippet: Remote protocol version 2.0, remote software version OpenSSH_4.7 whippet: Net::SSH::Perl Version 1.32, protocol version 2.0. whippet: No compat match: OpenSSH_4.7. whippet: Connection established. whippet: Sent key-exchange init (KEXINIT), wait response. whippet: Algorithms, c->s: 3des-cbc hmac-sha1 none whippet: Algorithms, s->c: 3des-cbc hmac-sha1 none whippet: Entering Diffie-Hellman Group 1 key exchange. whippet: Sent DH public key, waiting for reply. whippet: Received host key, type 'ssh-dss'. whippet: Host 'SERVER' is known and matches the host key. whippet: Computing shared secret key. whippet: Verifying server signature. whippet: Waiting for NEWKEYS message. whippet: Enabling incoming encryption/MAC/compression. whippet: Send NEWKEYS, enable outgoing encryption/MAC/compression. whippet: Sending request for user-authentication service. whippet: Service accepted: ssh-userauth. whippet: Trying empty user-authentication request. whippet: Authentication methods that can continue: publickey,password,keyboard-interactive. whippet: Next method to try is publickey. whippet: Next method to try is password. whippet: Trying password authentication. USERNAME@SERVER's password: whippet: Login completed, opening dummy shell channel. whippet: channel 0: new [client-session] whippet: Requesting channel_open for channel 0. whippet: channel 0: open confirm rwindow 0 rmax 32768 whippet: Got channel open confirmation, requesting shell. whippet: Requesting service shell on channel 0. whippet: channel 1: new [client-session] whippet: Requesting channel_open for channel 1. whippet: Entering interactive session. whippet: Requesting service pty-req on channel 1. whippet: Requesting shell. whippet: Requesting service shell on channel 1. whippet: channel 1: open confirm rwindow 0 rmax 32768 Connection to SERVER closed. (I never get a prompt, connection is closed almost instantly after entering password) --------------------------- Verbose Output for running a remote command: USERNAME@whippet ~ $ ./pssh -v SERVER "uname -a" whippet: Reading configuration data /home/USERNAME/.ssh/config whippet: Reading configuration data /etc/ssh_config whippet: Connecting to SERVER, port 22. whippet: Remote protocol version 2.0, remote software version OpenSSH_4.7 whippet: Net::SSH::Perl Version 1.32, protocol version 2.0. whippet: No compat match: OpenSSH_4.7. whippet: Connection established. whippet: Sent key-exchange init (KEXINIT), wait response. whippet: Algorithms, c->s: 3des-cbc hmac-sha1 none whippet: Algorithms, s->c: 3des-cbc hmac-sha1 none whippet: Entering Diffie-Hellman Group 1 key exchange. whippet: Sent DH public key, waiting for reply. whippet: Received host key, type 'ssh-dss'. whippet: Host 'SERVER' is known and matches the host key. whippet: Computing shared secret key. whippet: Verifying server signature. whippet: Waiting for NEWKEYS message. whippet: Enabling incoming encryption/MAC/compression. whippet: Send NEWKEYS, enable outgoing encryption/MAC/compression. whippet: Sending request for user-authentication service. whippet: Service accepted: ssh-userauth. whippet: Trying empty user-authentication request. whippet: Authentication methods that can continue: publickey,password,keyboard-interactive. whippet: Next method to try is publickey. whippet: Next method to try is password. whippet: Trying password authentication. USERNAME@SERVER's password: whippet: Login completed, opening dummy shell channel. whippet: channel 0: new [client-session] whippet: Requesting channel_open for channel 0. whippet: channel 0: open confirm rwindow 0 rmax 32768 whippet: Got channel open confirmation, requesting shell. whippet: Requesting service shell on channel 0. whippet: channel 1: new [client-session] whippet: Requesting channel_open for channel 1. whippet: Entering interactive session. whippet: Sending command: uname -a whippet: Requesting service exec on channel 1. whippet: channel 1: open confirm rwindow 0 rmax 32768 whippet: input_channel_request: rtype exit-status reply 0 whippet: channel 1: rcvd eof whippet: channel 1: output open -> drain whippet: channel 1: rcvd close whippet: channel 1: input open -> closed whippet: channel 1: close_read whippet: channel 1: obuf empty whippet: channel 1: output drain -> closed whippet: channel 1: close_write whippet: channel 1: send close whippet: channel 1: full closed Linux greatdane 2.6.18-gentoo-r6 #1 SMP Thu Jan 11 20:49:54 EST 2007 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux -Kevin |
From: Vanole, M. <MV...@at...> - 2008-10-19 17:55:50
|
Hi, I'm using Net::SSH::Perl to submit processes from Solaris to Windows Server 2003. Both client and server are running OpenSSH. My issue may not be related to ssh or Net::SSH::Perl but I need to begin with what I know. I am submitting very long running process to the server (Win) that may take hours to complete. What I have noticed is that the process is completing on the Windows side, but the Solaris side never stops "running". It's as if the connection stays open indefinitely waiting for the server process to exit. What I need is for the client program to end when the server process I initiate completes - which is what happens for processes that run inside 60 minutes (although I have had a six hour process complete as expected). I can use the sleep command to recreate this. $cmd = 'sleep 18000'; #5 hours %ssh_params = (identity_files => ["/home/user/.ssh/id_rsa"], protocol=> 2, debug => 0); $server = Net::SSH::Perl->new($hostname, %ssh_params); $server->login($username); ($stdout, $stderr, $exit) = $server->cmd($cmd); print "$exit\n"; # Never get to this point I've look at the various keeplive parameters, but none seem to address this. I would expect a long running process to appear idle so that the client disconnects, but not the other way around. Any advice on my next direction toward figuring this out is greatly appreciated. Thanks, Mike |
From: Greg S. M. <gr...@en...> - 2008-10-08 15:52:12
|
> I want to be able to write something like (with an existing ssh object, > login done) > $ssh->scp_push($localfile,$remotefile); > or > $ssh->scp_get($remotefile,$localfile); I'm afraid I do not have the time to look at this in detail. The best thing to do is open a new bug at rt.cpan.org and put this in as a feature request, so that it is not forgotten about and can be looked at by other people. http://rt.cpan.org/Public/Dist/Display.html?Name=Net-SSH-Perl -- Greg Sabino Mullane gr...@en... End Point Corporation |
From: Thierry C. <thi...@gm...> - 2008-10-08 08:35:08
|
Hello Greg and David, I see that there is a great work done with Net::SSH::Perl. I am happy since I was missing a functionnality, and I think that we can obtain result with the additions you have done. I want to be able to write something like (with an existing ssh object, login done) $ssh->scp_push($localfile,$remotefile); or $ssh->scp_get($remotefile,$localfile); It is possible with the module Net::SSH2 that David have written, and it is good enough for me, but ssh-agent si not supported with this module, and it is a key point. I didn't find the RFC where scp is described, so I had to analyze openssh and libssh2 in order to understand why I need to do. I have finally produce a protoype of what I want in Net/SSH/Perl/SSH2.pm sub scp_push { my $ssh = shift; my ($filesrc, $filedest) = @_; my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = stat($filesrc); open( my $filehandle, "$filesrc" ) or croak("Cannot open file $filesrc $!"); binmode ($filehandle); my @tmp=split("/",$filesrc); my $filesrc_invocation=$tmp[$#tmp]; my $cmd = "scp -v -t $filedest"; my $cmgr = $ssh->channel_mgr; my $channel = $ssh->_session_channel; $channel->open; $channel->register_handler( SSH2_MSG_CHANNEL_OPEN_CONFIRMATION, sub { my ( $channel, $packet ) = @_; $channel->{ssh}->debug("Sending command: $cmd"); my $r_packet = $channel->request_start( "exec", 0 ); $r_packet->put_str("$cmd"); $r_packet->send; if (defined $size) { $channel->send_data("C0644 $size $filesrc_invocation\n"); use constant CHUNK_SIZE => 8192; while (read ($filehandle, my $chunk, CHUNK_SIZE)){ $channel->send_data($chunk); $channel->drain_outgoing; $channel->{istate} = CHAN_INPUT_WAIT_DRAIN; } $channel->send_eof; $channel->{istate} = CHAN_INPUT_CLOSED; } } ); ..... You know what is next better than me ... ( $stdout, $stderr, $exit ); } As you can see, it is bad. My chunk_size is not large enough to have a good rate transfer. I didn't even know if there is some kind of negociation between client and server. I have write only a small small ;) subset of the scp protocol. It is a proof-of-concept prototype. My questions are: - I just see in the new 1.31 that there is a Subsystem generic call. Should I use it for this piece of code. - are you interested by this approach ? Is there something I don't see that is not allowing such functions to work ? - do you know where I can find a formal description of scp (I find openssh code not very documented) ? |
From: Greg S. M. <gr...@en...> - 2008-10-05 16:08:00
|
I'm happy to announce that version 1.31 of Net::SSH::Perl has been released. This is mostly identical to the earlier beta version: I added a few more tests and cleaned up some typos. You can find it here: http://search.cpan.org/dist/Net-SSH-Perl-1.31/ I'm working on getting the CPAN rights sorted out so it appears at a better, non-versioned URL. If you find any bugs or have suggestions, please visit: http://rt.cpan.org/Public/Dist/Display.html?Name=Net-SSH-Perl -- Greg Sabino Mullane gr...@en... End Point Corporation |
From: Greg S. M. <gr...@en...> - 2008-10-01 14:40:40
|
I've just uploaded a beta version of Net::SSH::Perl 1.31, which addresses a number of bugs. I invite everyone to try it out, and let me know of any problems that you find, so we can get the final 1.31 version released. http://search.cpan.org/~turnstep/Net-SSH-Perl-1.30_1/ -- Greg Sabino Mullane gr...@en... End Point Corporation |
From: <pab...@ne...> - 2008-09-23 23:41:18
|
Running Active State Perl v5.10 on a WinXP box.? Trying to use the Net::SSH::Perl module.? Get following error: "Can't locate Crypt/DH.pm in $INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .) at C:/Perl/site/lib/Net/SSH/Perl/Kex//DH1.pm line 13. Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl/Kex.pm line 6. Begin failed--compilation aborted at C:/Perl/site/lib/Net/SSH/Perl/Kex.pm line 6. Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 6. Begin failed--compilation aborted at C:/Perl/site/lib/Net/SSH/Perl/SSH2.pm line 6. Compilation failed in require at C:/Perl/site/lib/Net/SSH/Perl.pm line 54." In Active State's Perl Package Manager I can't find a Crypt/DH package.? Does anyone know if its included in another package? Or how to fix this problem? Thanks! Paul |
From: Chayan <cha...@gm...> - 2008-09-23 16:18:49
|
Please guide me to install Net::SSH::Perl as it is asking me to install a host of other modules leaving me very confused Thanks |
From: Vikas P. <vik...@ya...> - 2008-08-29 08:39:00
|
Hello All Can anybody tell me how to call a Function written in C language in my Perl code. If anyone can share small code it will be great help. Thanks in Advance Vikas Poonia |
From: S. C. <ste...@gm...> - 2008-08-21 21:33:01
|
On Ubuntu 8.04-32bit, I'm trying to get Net::SSH::Perl installed for the first time. I did get through installing libgmp3-dev, Math::BigInt::GMP, Math::Pari, and various other things. I'm trying to install using this command: sudo perl -MCPAN -e 'install Net::SSH::Perl' Everything looks good until it hangs on what seems to be the 3rd test: Manifying blib/man3/Net::SSH::Perl::Cipher::DES.3pm Manifying blib/man3/Net::SSH::Perl::Packet.3pm Manifying blib/man3/Net::SSH::Perl::Key::RSA.3pm /usr/bin/make -- OK Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01-compile.....ok t/02-buffer......ok t/03-packet......ok 1/10 Then it sits there forever, not consuming any CPU. Several hits about this on Google, but no answers. Anyone know what else I've missed? Stéphane Charette |
From: Vikas P. <vik...@ya...> - 2008-08-21 09:49:50
|
Hello All I am having a perl script that is used to delete all the special character but now the condtion is that if the last character is Alphabet, or star(*) or Questionmark(?) or number(0-9) then there shuld not be deletion of special characters. e.g if we have ab++ then output shub be AB if we have a++b then output shuld be A++B if there are all special character then all needs to be deleted. I have script that is used ot delete all special character but not fulfuling the condtion. IF Anyone can help it willl be great. Thanks in Advance This script deletes all the special character and i want it shuld not delete the charachters which are in between. #!/usr/bin/env perl $hsnr_vikas=&hsnr2norm("a-b1-1"); print "\n $hsnr_vikas\n"; sub hsnr2norm { local($hsnr)=@_; $hsnr=uc($hsnr); $hsnr=~s/[\-\"\'\!\§\$\%\&\/\.\'\´\`(\s+)\|]/-/g; $hsnr=~s/[\;\,\:\#\_\(\)\=\`\´\+\_\<\>\@\[\]\{\}\\\~]/-/g; $hsnr=~s/[\\\\\\\¦\÷\³\²\\^\¿\¶\±\¹\¥]/-/g; my $pos = 0; while ( $pos < length($hsnr) ) { $zeichen = substr( $hsnr,$pos,1 ); if ($zeichen =~ m/[0-9A-Z*?äàáâãäåæçèéêëìíîïñöòóôõöøüùúûüý]/) {$pos++; } else { $hsnr =~s/$zeichen//g; } } $hsnr; } |
From: <eri...@wa...> - 2008-07-31 21:31:41
|
I will be out of the office starting 07/25/2008 and will not return until 08/04/2008. I will have limited access to email. 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: Heiko J. <ja...@hb...> - 2008-07-30 21:26:00
|
Am Mittwoch, den 30.07.2008, 16:48 -0400 schrieb Steve Comrie: > I could give that a shot, but it appears that there isn't one > particular "problematic" method call. It's just when the remote server > disconnects me, the entire script goes ends with an error. It could be > right in the middle of a file transfer. It I wrapped the entire thing > in an eval block, it would be a bit of a pain to try and figure out > where in my nested loop I was when the connection dropped and would > most likely have to just start the entire process over again. Well, you should probably use many eval blocks then - one for each method call. Checking if something went wrong is usually mandatory, but I agree that dying instead of reporting errors is a bit harsh. > Which is sort of what I've resorted to doing, I was just hoping there > was a way to have Net::SFTP tell me when it dropped connection as > opposed to just "dying". None that I know of. But I'm not an expert for that module. > Do you know if there is a simple way to prevent attempting to perform > fsetstat on a put? No. However, that only means: "I don't know one" and not "there is none". I'm afraid that I won't be of any help with these problems. The only other suggestion I could make would be that you could give Net::SSH2 (which comes with SFTP support by itself) a try. Good luck ;-) Heiko |
From: Steve C. <st...@oc...> - 2008-07-30 20:48:55
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> Heiko Jansen wrote: <blockquote cite="mid:121...@tr..." type="cite"> <pre wrap="">Am Dienstag, den 29.07.2008, 13:54 -0400 schrieb Steve Comrie: </pre> <blockquote type="cite"> <pre wrap="">First, it would appear as though my clients SFTP server is occasionally reseting (or dropping) the connection. When this happens my automated transfer script completely dies with a closing connection message. Is it possible for me to trap this error (or test whether or not my $sftp object is connected) and have the script reconnect to the server to resume transfer? </pre> </blockquote> <pre wrap=""><!----> You should be able to wrap the problematic method call with an "eval" and have a look at $@ afterwards. And according to the Net::SFTP perldoc there ist the status() method to find out if something nasty happened after you called any of the other methods except from new(). </pre> </blockquote> I could give that a shot, but it appears that there isn't one particular "problematic" method call. It's just when the remote server disconnects me, the entire script goes ends with an error. It could be right in the middle of a file transfer. It I wrapped the entire thing in an eval block, it would be a bit of a pain to try and figure out where in my nested loop I was when the connection dropped and would most likely have to just start the entire process over again.<br> <br> Which is sort of what I've resorted to doing, I was just hoping there was a way to have Net::SFTP tell me when it dropped connection as opposed to just "dying".<br> <blockquote cite="mid:121...@tr..." type="cite"> <blockquote type="cite"> <pre wrap="">And secondly, the less important issue... my clients server doesn't allow me to fsetstat which doesn't appear to be a problem at all, but the script is outputting a large number of "Couldn't fsetstat: Operation unsupported" messages. I'd like to disable only that message if possible as it's not entirely useful while other error messages & warnings are. </pre> </blockquote> <pre wrap=""><!----> As far as I know, you cannot disable one specific warning - but you can pass a sub ref as argument "warn" to the new() method in which you can then decide what to do with the warnings you receive. See the perldoc for more info</pre> </blockquote> Do you know if there is a simple way to prevent attempting to perform fsetstat on a put?<br> <br> Thanks again .. <br> <br> ---<br> Steve Comrie<br> </body> </html> |
From: Heiko J. <ja...@hb...> - 2008-07-30 07:32:11
|
Am Dienstag, den 29.07.2008, 13:54 -0400 schrieb Steve Comrie: > First, it would appear as though my clients SFTP server is occasionally > reseting (or dropping) the connection. When this happens my automated > transfer script completely dies with a closing connection message. Is it > possible for me to trap this error (or test whether or not my $sftp > object is connected) and have the script reconnect to the server to > resume transfer? You should be able to wrap the problematic method call with an "eval" and have a look at $@ afterwards. And according to the Net::SFTP perldoc there ist the status() method to find out if something nasty happened after you called any of the other methods except from new(). > And secondly, the less important issue... my clients server doesn't > allow me to fsetstat which doesn't appear to be a problem at all, but > the script is outputting a large number of "Couldn't fsetstat: Operation > unsupported" messages. I'd like to disable only that message if possible > as it's not entirely useful while other error messages & warnings are. As far as I know, you cannot disable one specific warning - but you can pass a sub ref as argument "warn" to the new() method in which you can then decide what to do with the warnings you receive. See the perldoc for more info. Hope this helps Heiko |
From: Steve C. <st...@oc...> - 2008-07-29 17:55:17
|
Hello all, I'm using Net::SFTP to perform a scheduled batch transfer from one of my servers to a client's server and I'm running into one potentially critical issue and one "would-be-nice" issue. First, it would appear as though my clients SFTP server is occasionally reseting (or dropping) the connection. When this happens my automated transfer script completely dies with a closing connection message. Is it possible for me to trap this error (or test whether or not my $sftp object is connected) and have the script reconnect to the server to resume transfer? And secondly, the less important issue... my clients server doesn't allow me to fsetstat which doesn't appear to be a problem at all, but the script is outputting a large number of "Couldn't fsetstat: Operation unsupported" messages. I'd like to disable only that message if possible as it's not entirely useful while other error messages & warnings are. Any help would be much appreciated --- Steve Comrie |
From: mike c. <mi...@cl...> - 2008-07-23 22:55:48
|
I have been able to compile and install Net::SSh2 on Mac OS without issue. While trying on Fedora core 8 and 9 I get the following error during the make. I do have the prerequisites installed. [root@mikec Net-SSH2-0.18]# make cp lib/Net/SSH2/File.pm blib/lib/Net/SSH2/File.pm cp lib/Net/SSH2/Dir.pm blib/lib/Net/SSH2/Dir.pm cp lib/Net/SSH2/PublicKey.pm blib/lib/Net/SSH2/PublicKey.pm cp lib/Net/SSH2/SFTP.pm blib/lib/Net/SSH2/SFTP.pm cp lib/Net/SSH2/Listener.pm blib/lib/Net/SSH2/Listener.pm cp lib/Net/SSH2/Channel.pm blib/lib/Net/SSH2/Channel.pm cp lib/Net/SSH2.pm blib/lib/Net/SSH2.pm AutoSplitting blib/lib/Net/SSH2.pm (blib/lib/auto/Net/SSH2) /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap SSH2.xs > SSH2.xsc && mv SSH2.xsc SSH2.c gcc -c -I/usr/local/include -I. -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 -m64 -mtune=generic -DVERSION=\"0.18\" -DXS_VERSION=\"0.18\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE" SSH2.c In file included from SSH2.xs:11: ppport.h:3042:1: warning: "PERL_UNUSED_DECL" redefined In file included from SSH2.xs:8: /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE/perl.h:163:1: warning: this is the location of the previous definition SSH2.c: In function XS_Net__SSH2_channel¹: SSH2.c:1450: warning: value computed is not used SSH2.c:1451: warning: value computed is not used SSH2.c: In function XS_Net__SSH2__scp_get¹: SSH2.c:1510: warning: value computed is not used SSH2.c:1511: warning: value computed is not used SSH2.c: In function XS_Net__SSH2__scp_put¹: SSH2.c:1565: warning: value computed is not used SSH2.c:1566: warning: value computed is not used SSH2.c: In function XS_Net__SSH2_tcpip¹: SSH2.c:1622: warning: value computed is not used SSH2.c:1623: warning: value computed is not used SSH2.c: In function XS_Net__SSH2__Listener_accept¹: SSH2.c:2388: warning: value computed is not used SSH2.c:2389: warning: value computed is not used SSH2.xs: In function XS_Net__SSH2__SFTP_open¹: SSH2.xs:1352: warning: suggest parentheses around && within || SSH2.xs:1353: warning: suggest parentheses around && within || SSH2.xs:1354: warning: suggest parentheses around && within || SSH2.xs:1355: warning: suggest parentheses around && within || SSH2.xs:1356: warning: suggest parentheses around && within || SSH2.xs:1357: warning: suggest parentheses around && within || SSH2.xs:1358: warning: suggest parentheses around && within || SSH2.c:2552: warning: value computed is not used SSH2.c:2553: warning: value computed is not used SSH2.xs: In function XS_Net__SSH2__PublicKey_add¹: SSH2.xs:1741: warning: pointer targets in passing argument 2 of libssh2_publickey_add_ex¹ differ in signedness SSH2.xs:1741: warning: pointer targets in passing argument 4 of libssh2_publickey_add_ex¹ differ in signedness SSH2.xs: In function XS_Net__SSH2__PublicKey_remove¹: SSH2.xs:1755: warning: pointer targets in passing argument 2 of libssh2_publickey_remove_ex¹ differ in signedness SSH2.xs:1755: warning: pointer targets in passing argument 4 of libssh2_publickey_remove_ex¹ differ in signedness Running Mkbootstrap for Net::SSH2 () chmod 644 SSH2.bs rm -f blib/arch/auto/Net/SSH2/SSH2.so gcc -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic SSH2.o -o blib/arch/auto/Net/SSH2/SSH2.so \ -L/usr/local/lib -lssh2 \ chmod 755 blib/arch/auto/Net/SSH2/SSH2.so cp SSH2.bs blib/arch/auto/Net/SSH2/SSH2.bs chmod 644 blib/arch/auto/Net/SSH2/SSH2.bs Manifying blib/man3/Net::SSH2::File.3pm Manifying blib/man3/Net::SSH2::PublicKey.3pm Manifying blib/man3/Net::SSH2::Dir.3pm Manifying blib/man3/Net::SSH2::SFTP.3pm Manifying blib/man3/Net::SSH2::Listener.3pm Manifying blib/man3/Net::SSH2::Channel.3pm Manifying blib/man3/Net::SSH2.3pm -- mike cannon mi...@cl... 864.650.2577 (cell) 864.656.3809 (office) computing & information technology 340 computer court anderson, sc 29625 |
From: dale s. <dal...@hp...> - 2008-07-21 15:14:42
|
Perl ssh users, I'm trying to use Net::SSH::Perl to ssh into ilo2 on a proliant server. I can run ssh from a linux box and connect to ilo2 without any problems. I can also connect to other Linux boxes with Net::SSH::Perl. I have enabled the debug parameter and show the output below. Does anyone have suggestions for debugging the premature disconnect? Thanks, Dale Sykora msa7n30: Reading configuration data /root/.ssh/config msa7n30: Reading configuration data /etc/ssh_config msa7n30: Allocated local port 1023. msa7n30: Connecting to 192.168.205.101, port 22. msa7n30: Remote version string: SSH-2.0-mpSSH_0.0.1 msa7n30: Remote protocol version 2.0, remote software version mpSSH_0.0.1 msa7n30: Net::SSH::Perl Version 1.30, protocol version 2.0. msa7n30: No compat match: mpSSH_0.0.1. msa7n30: Connection established. msa7n30: Sent key-exchange init (KEXINIT), wait response. msa7n30: Algorithms, c->s: 3des-cbc hmac-sha1 none msa7n30: Algorithms, s->c: 3des-cbc hmac-sha1 none msa7n30: Entering Diffie-Hellman Group 1 key exchange. msa7n30: Sent DH public key, waiting for reply. msa7n30: Received host key, type 'ssh-dss'. msa7n30: Host '192.168.205.101' is known and matches the host key. msa7n30: Computing shared secret key. msa7n30: Verifying server signature. msa7n30: Waiting for NEWKEYS message. msa7n30: Enabling incoming encryption/MAC/compression. msa7n30: Send NEWKEYS, enable outgoing encryption/MAC/compression. msa7n30: Sending request for user-authentication service. msa7n30: Service accepted: ssh-userauth. msa7n30: Trying empty user-authentication request. msa7n30: Authentication methods that can continue: password,publickey. msa7n30: Next method to try is password. msa7n30: Trying password authentication. msa7n30: Login completed, opening dummy shell channel. msa7n30: channel 0: new [client-session] msa7n30: Requesting channel_open for channel 0. msa7n30: channel 0: open confirm rwindow 32768 rmax 2048 msa7n30: Got channel open confirmation, requesting shell. msa7n30: Requesting service shell on channel 0. msa7n30: channel 1: new [client-session] msa7n30: Requesting channel_open for channel 1. msa7n30: Entering interactive session. Received disconnect message: Client Disconnect at /usr/lib/perl5/vendor_perl/5.8.8/Net/SSH/Perl/SSH2.pm line 284 [root@msa7n30 .ssh]# |