I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-09-19 02:11:25-07 by outfitterjack
After issuing valid command, only 'logout' output is displayed

No matter what command is issued, all I get is the output that would be generated after an interactive session has 'exited'. For some reason, the buffer seems to be getting flushed. This device is a Cisco Call Manager with access via SSH2. Below I show the script along with the output generated and the output from a 'manual' login via SecureCRT. Any help would be greatly appreciated.
Thanks

Script
======================
#!/usr/bin/perl use Net::SSH::Perl; use Math::BigInt::GMP; my $server = '10.1.1.1'; my $ssh = Net::SSH::Perl->new($server); print "Logging into server... "; $ssh->login('user', 'passwd'); print "Running command ($command)... "; my ($out, $errors, $exit) = $ssh->cmd('show logins'); print "$out";



Programatic Output
=======================
[user@linux2 voice_dupes]$ ./dupes.pl
Logging into server... Running command (show logins)...

Copyright Cisco Systems 2006-2008

[user@linux2 voice_dupes]$

Manual Output:
=======================
Last login: Thu Sep 18 21:48:36 2008 from 10.9.9.9

Welcome to the Platform Command Line Interface

admin:show logins
pwccmadm pts/0 1.1.1.1 Thu Sep 18 22:35 still logged in
pwccmadm pts/1 1.1.1.1 Thu Sep 18 21:48 - 21:48 (00:00)

wtmp begins Tue Sep 2 10:54:05 2008

admin:exit



Copyright Cisco Systems 2006-2008

Direct Responses: Write a response