Scrat has asked for the wisdom of the Perl Monks concerning the following question:
Hi all
I have the same problem as described here. This problem was resolved in this thread.
The only problem is that it seems the soulcage repo has disappeared, and I don't have a clue as to where to get the "working" module now.
Anyone have an idea?
Anyway, here's my code:
#! /usr/bin/perl use strict; use warnings; use Net::SSH::W32Perl; use Data::Dumper; my $host = "xxx.xxx.xxx.xxx"; $ENV{HOME} = "C:\\temp"; my $sftp = Net::SSH::W32Perl->new($host, protocol => '2', debug => '1' +); $sftp->login("user", "password"); my ($out, $err, $exit) = $sftp-> cmd("ls"); exit;
And here is the output:
sxi009: Reading configuration data C:\temp/.ssh/config sxi009: Reading configuration data /etc/ssh_config sxi009: Connecting to xxx.xxx.xxx.xxx, port 22. sxi009: Socket created, turning on blocking... sxi009: Remote version string: SSH-2.0-1.36_sshlib GlobalSCAPE sxi009: Remote protocol version 2.0, remote software version 1.36_sshl +ib GlobalSCAPE sxi009: Net::SSH::Perl Version 1.30, protocol version 2.0. .xi009: No compat match: 1.36_sshlib GlobalSCAPE sxi009: Connection established. sxi009: Sent key-exchange init (KEXINIT), wait response. sxi009: Algorithms, c->s: 3des-cbc hmac-sha1 none sxi009: Algorithms, s->c: 3des-cbc hmac-sha1 none sxi009: Entering Diffie-Hellman Group 1 key exchange. sxi009: Sent DH public key, waiting for reply. sxi009: Received host key, type 'ssh-dss'. sxi009: Host xxx.xxx.xxx.xxx' is known and matches the host key. sxi009: Computing shared secret key. sxi009: Verifying server signature. sxi009: Waiting for NEWKEYS message. sxi009: Enabling incoming encryption/MAC/compression. sxi009: Send NEWKEYS, enable outgoing encryption/MAC/compression. sxi009: Sending request for user-authentication service. sxi009: Service accepted: ssh-userauth. sxi009: Trying empty user-authentication request. sxi009: Authentication methods that can continue: publickey,password. sxi009: Next method to try is publickey. sxi009: Next method to try is password. sxi009: Trying password authentication. sxi009: Login completed, opening dummy shell channel. sxi009: channel 0: new [client-session] sxi009: Requesting channel_open for channel 0. sxi009: channel 0: open confirm rwindow 16384 rmax 35840 sxi009: Got channel open confirmation, requesting shell. sxi009: Requesting service shell on channel 0. sxi009: channel 1: new [client-session] sxi009: Requesting channel_open for channel 1. sxi009: Entering interactive session. sxi009: Sending command: ls sxi009: Requesting service exec on channel 1. sxi009: channel 1: open confirm rwindow 16384 rmax 35840
It just hangs after the last line. I'm pretty sure the Net-SSH-W32Perl module from the soulcage repo will solve my problem, if I only knew where to get it.
Regards
Scrat
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net-SSH-W32Perl hanging (Solved)
by cmv (Chaplain) on Apr 16, 2009 at 20:39 UTC | |
|
Re: Net-SSH-W32Perl hanging
by tokpela (Chaplain) on Feb 12, 2009 at 09:12 UTC | |
by Scrat (Monk) on Mar 20, 2009 at 11:51 UTC |