|
Posted by Dark on March 10, 2005, 1:14 pm
Please log in for more thread options
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 = 1;
#$params = 1;
$params = 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: $outnStandard Error: $errnExit code: $exitn";
$ssh->cmd("exit");
|
| Similar Threads | Posted | | Net::SSH::W32Perl Script hanging when trying to return data | March 10, 2005, 1:30 pm |
| perl script for uploading photo and getting the return value of submit | February 28, 2006, 1:03 am |
| How to solve memory problems while running a script parsing huge data | July 13, 2004, 1:23 pm |
| GnuPG::Interface Hanging | April 6, 2006, 10:45 am |
| timeouts for Net::SSH::W32Perl | January 27, 2005, 2:23 am |
| set_tty error from NET::SSH::W32PERL | August 24, 2004, 7:52 am |
| starting a background process via Net::SSH::W32Perl | September 7, 2004, 10:41 am |
| Net::SFTP / Net::SSH::W32Perl strange debug messages? | August 13, 2006, 11:06 am |
| system return value? | January 26, 2007, 5:52 pm |
| Net::Cmd::code doesn't return value of Net::Cmd::dataend | January 10, 2005, 9:17 pm |
|