[Chicago-talk] Net::SSH::W32Perl

Young, Darren Darren.Young at chicagobooth.edu
Fri Nov 6 11:43:25 PST 2009

Using strawberry perl 5.8.9 on XP and having issues with
Net::SSH::W32Perl. I have everything installed but the ssh command gets
no results.

The sub:

sub _getFilerSysconfig {
    my $ssh;
    my $stdout;
    my $stderr;
    my $exit;
    my $cmd;

    logmsg("default filer: $DEFAULT_FILER");
    $ssh = Net::SSH::Perl->new($DEFAULT_FILER, debug => 1);

    logmsg("Login, user => $FILER_USER, password => $FILER_PASSWORD");
    $ssh->login($FILER_USER, $FILER_PASSWORD);

    $cmd = "sysconfig";
    logmsg("cmd: $cmd");
    ($stdout, $stderr, $exit) = $ssh->cmd($cmd);

    logmsg("stdout: $stdout");
    logmsg("stderr: $stderr");
    logmsg("exit: $exit");


And the results:

[2009-11-06 13:39:11] main(): default filer: gsbhfs1.chicagogsb.edu
[2009-11-06 13:39:11] main(): New
dyoung-windows: Reading configuration data /.ssh/config
dyoung-windows: Reading configuration data /etc/ssh_config
dyoung-windows: Connecting to gsbhfs1.chicagogsb.edu, port 22.
dyoung-windows: Remote protocol version 2.0, remote software version
dyoung-windows: Net::SSH::Perl Version 1.34, protocol version 2.0.
dyoung-windows: No compat match: OpenSSH_3.4p1.
dyoung-windows: Connection established.
[2009-11-06 13:39:11] main(): Login, user => appauto, password =>
dyoung-windows: Sent key-exchange init (KEXINIT), wait response.
dyoung-windows: Algorithms, c->s: 3des-cbc hmac-sha1 none
dyoung-windows: Algorithms, s->c: 3des-cbc hmac-sha1 none
dyoung-windows: Entering Diffie-Hellman Group 1 key exchange.
dyoung-windows: Sent DH public key, waiting for reply.
dyoung-windows: Received host key, type 'ssh-dss'.
dyoung-windows: Host 'gsbhfs1.chicagogsb.edu' is known and matches the
host key.
dyoung-windows: Computing shared secret key.
dyoung-windows: Verifying server signature.
dyoung-windows: Waiting for NEWKEYS message.
dyoung-windows: Send NEWKEYS.
dyoung-windows: Enabling encryption/MAC/compression.
dyoung-windows: Sending request for user-authentication service.
dyoung-windows: Service accepted: ssh-userauth.
dyoung-windows: Trying empty user-authentication request.
dyoung-windows: Authentication methods that can continue:
dyoung-windows: Next method to try is publickey.
dyoung-windows: Next method to try is password.
dyoung-windows: Trying password authentication.
dyoung-windows: Login completed, opening dummy shell channel.
dyoung-windows: channel 0: new [client-session]
dyoung-windows: Requesting channel_open for channel 0.
dyoung-windows: channel 0: open confirm rwindow 0 rmax 32768
dyoung-windows: Got channel open confirmation, requesting shell.
dyoung-windows: Requesting service shell on channel 0.
[2009-11-06 13:39:12] main(): cmd: sysconfig
dyoung-windows: channel 1: new [client-session]
dyoung-windows: Requesting channel_open for channel 1.
dyoung-windows: Entering interactive session.
dyoung-windows: channel 0: rcvd close
dyoung-windows: channel 0: output open -> drain
dyoung-windows: channel 0: input open -> closed
dyoung-windows: channel 0: close_read
dyoung-windows: channel 0: obuf empty
dyoung-windows: channel 0: output drain -> closed
dyoung-windows: channel 0: close_write
dyoung-windows: channel 0: send close
dyoung-windows: channel 0: full closed
[2009-11-06 13:39:12] main(): stdout: 
[2009-11-06 13:39:12] main(): stderr: 
[2009-11-06 13:39:12] main(): exit:

So, it appears to be connecting and authenticating but there's 0 data
coming back from the command. If I manually ssh as that user and run the
command (from the same source) I get the output of the command.

Any thoughts?

Darren Young
Systems & Security Architect
Computing Services
University of Chicago
Booth School of Business
5807 South Woodlawn Avenue
Chicago, IL 60637
Voice 773.702.0331 | Fax 773.702.0233

More information about the Chicago-talk mailing list