Trying to get a simple perl program using Net:SSH:Perl module work on Sun Solaris 5.8 Going from Solaris 5.8 to Solaris 2.8 machine. code snippet below
#!/apps/perl/bin/perl use Net::SSH::Perl ; chomp(my $this_host = `hostname`); print "Enter host name : [$this_host] "; chomp(my $host = <STDIN>); print "\n"; my $this_user = scalar getpwuid($<); print "Enter your username : [$this_user] "; chomp(my $user = <STDIN>); print "And your password: "; chomp(my $pass =<STDIN>); $scon = Net::SSH::Perl->new ($host || $this_host, protocol => 2, debug + => 1); $scon->login($user || $this_user,$pass); print "looking around ...\n"; my($output,$errors,$exit) = $scon->cmd("ls -l"); print "output:$output|\n"; print "errors:$errors|\n"; print "exit:$exit|\n";
in mutiple runs that we did, it just drops/quits exactly at the same point... sample output and the tail end of the 'truss' output of the program is shown....any advise from the experts in solving this problem will be great....
Enter a host name to connect to: [abc123] xyz123 Enter your username on that host: [login12] login12 And your password: log123 abc123: Reading configuration data /home/dba/.ssh/config abc123: Reading configuration data /etc/ssh_config abc123: Connecting to xyz123, port 22. abc123: Remote version string: SSH-2.0-OpenSSH_4.1 abc123: Remote protocol version 2.0, remote software version OpenSSH_4 +.1 abc123: Net::SSH::Perl Version 1.30, protocol version 2.0. abc123: No compat match: OpenSSH_4.1. abc123: Connection established. abc123: Sent key-exchange init (KEXINIT), wait response. abc123: Algorithms, c->s: 3des-cbc hmac-sha1 none abc123: Algorithms, s->c: 3des-cbc hmac-sha1 none abc123: Entering Diffie-Hellman Group 1 key exchange. abc123: Sent DH public key, waiting for reply. abc123: Received host key, type 'ssh-dss'. abc123: Host 'xyz123' is known and matches the host key. abc123: Computing shared secret key. abc123: Verifying server signature. abc123: Waiting for NEWKEYS message. abc123: Enabling incoming encryption/MAC/compression. abc123: Send NEWKEYS, enable outgoing encryption/MAC/compression. abc123: Sending request for user-authentication service. abc123%
tail of truss output follows..
write(4, "\0\0\0\f\n15C6 DBD V qFB".., 16) = 16 getcontext(0xFFBEF620) amaprd61: Sending request for user-authentication service. write(2, " a m a p r d 6 1 : S e".., 59) = 59 getcontext(0xFFBEF530) getcontext(0xFFBEF388) getcontext(0xFFBEF530) getcontext(0xFFBEF388) write(4, " }C2F0F587A6 ~\n9E a18 =".., 52) Err#32 EPIPE Received signal #13, SIGPIPE [default] *** process killed ***

In reply to Problem using Net:SSH:Perl by galaxy123

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.