<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Perl SSH::Perl Module in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039262#M753799</link>
    <description>never used the module but according the the perldoc the cmd method returns the stdout, stderr, and exit status. From the synopsis:&lt;BR /&gt;&lt;BR /&gt;use Net::SSH::Perl;&lt;BR /&gt;my $ssh = Net::SSH::Perl-&amp;gt;new($host);&lt;BR /&gt;$ssh-&amp;gt;login($user, $pass);&lt;BR /&gt;my($stdout, $stderr, $exit) = $ssh-&amp;gt;cmd($cmd);&lt;BR /&gt;&lt;BR /&gt;hope that answers your question.</description>
    <pubDate>Tue, 10 Apr 2007 15:35:51 GMT</pubDate>
    <dc:creator>Court Campbell</dc:creator>
    <dc:date>2007-04-10T15:35:51Z</dc:date>
    <item>
      <title>Perl SSH::Perl Module</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039261#M753798</link>
      <description>Hello Gurus, I need a little assistance.&lt;BR /&gt;I'm trying to develop a GUI monitor application for my operations using Perl/TK. This app will monitor all our HPUX systems. I'm having a little problem with the Net::SSH&lt;BR /&gt;module. The problem is that all commands that I issue with this module writes to STDOUT. but i need it to write to a variable so that i can manipulate the data. I have tried redirecting STDOUT in my script to write to a file, which works ok but then i can't change STDOUT back so I can open up the file and manipulate the date. attached is the script I writtened any help will be appreciated.</description>
      <pubDate>Tue, 10 Apr 2007 15:26:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039261#M753798</guid>
      <dc:creator>David Bellamy</dc:creator>
      <dc:date>2007-04-10T15:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Perl SSH::Perl Module</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039262#M753799</link>
      <description>never used the module but according the the perldoc the cmd method returns the stdout, stderr, and exit status. From the synopsis:&lt;BR /&gt;&lt;BR /&gt;use Net::SSH::Perl;&lt;BR /&gt;my $ssh = Net::SSH::Perl-&amp;gt;new($host);&lt;BR /&gt;$ssh-&amp;gt;login($user, $pass);&lt;BR /&gt;my($stdout, $stderr, $exit) = $ssh-&amp;gt;cmd($cmd);&lt;BR /&gt;&lt;BR /&gt;hope that answers your question.</description>
      <pubDate>Tue, 10 Apr 2007 15:35:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039262#M753799</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-04-10T15:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Perl SSH::Perl Module</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039263#M753800</link>
      <description>Sorry it's the Net::SSH module and it doesn't use the stdout,stderr,exit variables.&lt;BR /&gt;Also the Net::SSH::Perl module take to long authenticated.</description>
      <pubDate>Tue, 10 Apr 2007 15:52:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039263#M753800</guid>
      <dc:creator>David Bellamy</dc:creator>
      <dc:date>2007-04-10T15:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Perl SSH::Perl Module</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039264#M753801</link>
      <description>i see that now, sorry.</description>
      <pubDate>Tue, 10 Apr 2007 16:38:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039264#M753801</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-04-10T16:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Perl SSH::Perl Module</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039265#M753802</link>
      <description>Hi David:&lt;BR /&gt;&lt;BR /&gt;Perl's 'select' should help you.  Consider this:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;my $log = '/tmp/mylog';&lt;BR /&gt;open(FH,"&amp;gt;",$log) or die "Can't open '$log': $!\n";&lt;BR /&gt;print "This goes to your terminal (STDOUT)...\n";&lt;BR /&gt;my $oldfh = select(FH);&lt;BR /&gt;print "...but this goes to the log file...\n";&lt;BR /&gt;select($oldfh); #...back to STDOUT...&lt;BR /&gt;print "...and this you see on your terminal, again\n";&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;The 'select' returns the currently selected output filehandle, and if another filehandle is supplied, it sets that one as the current output default.  Thus, a write or a print without a filehandle argument defaults to this filehandle.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 10 Apr 2007 19:05:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039265#M753802</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-04-10T19:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Perl SSH::Perl Module</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039266#M753803</link>
      <description>Hi David,&lt;BR /&gt;&lt;BR /&gt;I have to admid to never have used Net::SSH&lt;BR /&gt;as I consider it somewhat redundant because it is more or less only a wrapper around the ssh command.&lt;BR /&gt;But it has a more palatable interface than doing the forking and piping with standard Perl IPC techniques.&lt;BR /&gt;So I just have looked up the POD of Net::SSH&lt;BR /&gt;&lt;A href="http://search.cpan.org/~ivan/Net-SSH-0.08/SSH.pm" target="_blank"&gt;http://search.cpan.org/~ivan/Net-SSH-0.08/SSH.pm&lt;/A&gt;&lt;BR /&gt;only to discover that it already comes with a &lt;BR /&gt;sshopen2() function for pretty straight forward access to STDIN and STDOUT.&lt;BR /&gt;Please, see the example in the POD.&lt;BR /&gt;If you are also interested in STDERR use sshopen3(), which gives you even handles to three pipes.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Apr 2007 07:51:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039266#M753803</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-04-11T07:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Perl SSH::Perl Module</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039267#M753804</link>
      <description>Thanks to all. Ralph thanks the answer was in front of me all the time and i wasn't seeing it.</description>
      <pubDate>Thu, 12 Apr 2007 11:46:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/perl-ssh-perl-module/m-p/5039267#M753804</guid>
      <dc:creator>David Bellamy</dc:creator>
      <dc:date>2007-04-12T11:46:44Z</dc:date>
    </item>
  </channel>
</rss>

