Net::SSH::W32Perl Script hanging when trying to return data
From: Dark (darkknight69_at_gmail.com)
Date: 03/10/05
- Previous message: ecuity: "Crypt:DES make problem on Solaris 9"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 10 Mar 2005 12:14:07 -0800
Im trying to return an ls -l and when I execute my Perl Script it
hangs. It seems Im not processing stdout properly.
C:\>ssh_test2.pl
Use of uninitialized value in concatenation (.) or string at
C:/Perl/site/lib/Net/SSH/Perl.pm
line 107.
phl3-0021647: Reading configuration data /.ssh/config
phl3-0021647: Reading configuration data /etc/ssh_config
phl3-0021647: Connecting to str7922app, port 22.
phl3-0021647: Socket created, turning on blocking...
phl3-0021647: Remote protocol version 2.0, remote software version
OpenSSH_3.4p1
phl3-0021647: Net::SSH::Perl Version 1.25, protocol version 2.0.
Use of uninitialized value in concatenation (.) or string at
C:/Perl/site/lib/Net/SSH/Perl/SS
H2.pm line 41, <GEN0> line 1.
Use of uninitialized value in concatenation (.) or string at
C:/Perl/site/lib/Net/SSH/Perl/SS
H2.pm line 47, <GEN0> line 1.
phl3-0021647: No compat match: OpenSSH_3.4p1.
phl3-0021647: Connection established.
phl3-0021647: Sent key-exchange init (KEXINIT), wait response.
phl3-0021647: Algorithms, c->s: 3des-cbc hmac-sha1 none
phl3-0021647: Algorithms, s->c: 3des-cbc hmac-sha1 none
phl3-0021647: Entering Diffie-Hellman Group 1 key exchange.
phl3-0021647: Sent DH public key, waiting for reply.
phl3-0021647: Received host key, type 'ssh-dss'.
phl3-0021647: Host 'str7922app' is known and matches the host key.
phl3-0021647: Computing shared secret key.
phl3-0021647: Verifying server signature.
phl3-0021647: Waiting for NEWKEYS message.
phl3-0021647: Enabling incoming encryption/MAC/compression.
phl3-0021647: Send NEWKEYS, enable outgoing encryption/MAC/compression.
phl3-0021647: Sending request for user-authentication service.
phl3-0021647: Service accepted: ssh-userauth.
phl3-0021647: Trying empty user-authentication request.
phl3-0021647: Authentication methods that can continue:
publickey,password.
phl3-0021647: Next method to try is publickey.
phl3-0021647: Next method to try is password.
phl3-0021647: Trying password authentication.
phl3-0021647: Login completed, opening dummy shell channel.
phl3-0021647: channel 0: new [client-session]
phl3-0021647: Requesting channel_open for channel 0.
phl3-0021647: channel 0: open confirm rwindow 0 rmax 32768
phl3-0021647: Got channel open confirmation, requesting shell.
phl3-0021647: Requesting service shell on channel 0.
phl3-0021647: channel 1: new [client-session]
phl3-0021647: Requesting channel_open for channel 1.
phl3-0021647: Entering interactive session.
phl3-0021647: Sending command: uname
phl3-0021647: Requesting service exec on channel 1.
phl3-0021647: channel 1: send eof
phl3-0021647: channel 1: open confirm rwindow 131070 rmax 32768
phl3-0021647: channel 1: rcvd eof
phl3-0021647: channel 1: output open -> drain
phl3-0021647: input_channel_request: rtype exit-status reply 0
phl3-0021647: channel 1: rcvd close
Terminating on signal SIGINT(2)
C:\>
Here is the script
#!/usr/bin/perl -w
use Net::SSH::W32Perl;
my %params;
$params{debug} = 1;
#$params{protocol} = 1;
$params{port} = 22;
$host = "str7922app";
$user = "posusr";
$pass = "360user1";
$ssh = new Net::SSH::W32Perl($host, %params);
$ssh -> login($user, $pass);
my ($out, $err, $exit) = $ssh -> cmd('ls' ,"\n");
print "Standard out: $out\nStandard Error: $err\nExit code: $exit\n";
$ssh->cmd("exit");
- Previous message: ecuity: "Crypt:DES make problem on Solaris 9"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|