Bonjour,

        I was able to use SSH:W32Perl on Windows!  You can go to this web site 
to get the details about how to do it: 
http://qs321.pair.com/~monkads/index.pl?node_id=312916

        To save time, here's a copy of the email that explain what to do:

---
Re: Re: Re: Re: Re: SFTP hangs (winxp)
by shenme on Dec 10, 2003 at 05:55 UTC

      Hoorah!   Hoorah!

      TLSXPA: Entering interactive session.
      TLSXPA: Sending command: date
      TLSXPA: Requesting service exec on channel 1.
      TLSXPA: channel 1: open confirm rwindow 0 rmax 32768
      TLSXPA: input_channel_request: rtype exit-status reply 0
      TLSXPA: channel 1: rcvd eof
      TLSXPA: channel 1: output open -> drain
      TLSXPA: channel 1: rcvd close
      TLSXPA: channel 1: input open -> closed
      TLSXPA: channel 1: close_read
      TLSXPA: channel 1: obuf empty
      TLSXPA: channel 1: output drain -> closed
      TLSXPA: channel 1: close_write
      TLSXPA: channel 1: send close
      TLSXPA: channel 1: full closed
       exit   '0'
       stdout 'Tue Dec  9 23:28:44 CST 2003'

      I added Scott Scecina's repository as advised

        rep add soulcage http://www.soulcage.net/ppds.58/

      then moved the repository higher in the list that PPM3 was looking at, 
then uninstalled both Net-SSH-W32Perl and Net-SSH-Perl, then re-installed 
Net-SSH-W32Perl from his repository, and huzzah!

      And after reading his ERRATA.txt comments, where he said he'd modified 
Net::SFTP to understand to use Net::SSH::W32Perl, I uninstalled Net-SFTP and 
re-installed it.   I retried the Net::SFTP test program.   After figuring out 
that I needed to change the ls() call to   my @files = $sftp->ls('.');   I was 
able to get it working too!

---
        I'm now able to do remote cmd on my Unix host with this code example:

                    use Net::SSH::W32Perl;

                    my $host = 'myhost';
                    my $ssh = new Net::SSH::W32Perl($host);
                    $ssh->login('$user', '$pwd');  # 30 seconds to 
login...why?!?!
    
                    my ($out, $err, $exit) = $ssh->cmd("ls");

                    print $out;

        Now, the only problem is the time it take to login...if you have any 
idea why it take 30 seconds to login, let me known!

        Have fun!!!  :o)

----
Dominic Dupuis


-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Allegakoen, 
Justin Devanandan
Envoyé : mercredi 18 janvier 2006 19:58
À : [email protected]
Objet : RE: :SSH::W32Perl - Redirecting output only?!?

----8<---------          
        ----
        use Net::SSH::W32Perl;
        my $ssh = Net::SSH::W32Perl->new($host, debug=>1);
         
        $ssh->login('xxxxx', 'xxxxxxxxx');
        my($stdout, $stderr, $exit) = $ssh->cmd('ls', "\n");
        
         
        print "$stdout\n$stderr\n$exit\n";
        ----
                 
            And this one work...but I want to get back $stdout...I don't want 
to create a file...I want the result back!!!
----8<---------

Bonjour mon Net::SSH::W32Perl ami,

Unfortunately redirection seems to be the only way to get W32Perl code to work. 
I thought I could live with that and use Net::SFTP to get the redirected output 
on my WinXP machine, but that too hangs even when you update the module to use 
Net::SSH::W32Perl.

I and others I've contacted offline have spent hours googling to no avail. Most 
of us gave up and went down the CGI path, but for the time being I'm leaving it 
on my to do list.

Do let the list know if you come up with anything.

Bonne chance!

Just in

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to