<?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: telnet script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905199#M404886</link>
    <description>To install the module:&lt;BR /&gt;&lt;BR /&gt;download it somewhere (anywhere)&lt;BR /&gt;&lt;BR /&gt;gunzip Net-Telnet-3.03.tar.gz&lt;BR /&gt;tar -xvf Net-Telnet-3.03.tar&lt;BR /&gt;cd Net-Telnet-3.03&lt;BR /&gt;perl Makefile.PL&lt;BR /&gt;make&lt;BR /&gt;make test&lt;BR /&gt;make install&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
    <pubDate>Thu, 02 Jun 2005 09:12:25 GMT</pubDate>
    <dc:creator>harry d brown jr</dc:creator>
    <dc:date>2005-06-02T09:12:25Z</dc:date>
    <item>
      <title>telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905193#M404880</link>
      <description>Does anyone have a script that can automatically telnet to a number of servers in a loop to check if I can quickly connect and then disconnect and go on to the next server.</description>
      <pubDate>Thu, 02 Jun 2005 07:56:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905193#M404880</guid>
      <dc:creator>Donald C Nelson</dc:creator>
      <dc:date>2005-06-02T07:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905194#M404881</link>
      <description>Telnet is probably not a good tool for that.&lt;BR /&gt;&lt;BR /&gt;Thats becaue you have to provide a password which must be hardcoded into the script and is tranmitted across the network in clear text.&lt;BR /&gt;&lt;BR /&gt;But:&lt;BR /&gt;&lt;BR /&gt;You can do this:&lt;BR /&gt;&lt;BR /&gt;Install this:&lt;BR /&gt;&lt;A href="http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA" target="_blank"&gt;http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Set up password free public key exchange according to the word document I'm attaching:&lt;BR /&gt;&lt;BR /&gt;Then run this check with ssh.&lt;BR /&gt;&lt;BR /&gt;make a list of servers&lt;BR /&gt;&lt;BR /&gt;serverlist&lt;BR /&gt;&lt;BR /&gt;server1&lt;BR /&gt;server2&lt;BR /&gt;&lt;BR /&gt;Then this little loop:&lt;BR /&gt;&lt;BR /&gt;user=testit&lt;BR /&gt;&lt;BR /&gt;while read -r server&lt;BR /&gt;do&lt;BR /&gt;    ssh ${user}@${server} "exit"&lt;BR /&gt;    rc=$?&lt;BR /&gt;    if [ $rc -eq 0 ]&lt;BR /&gt;    then&lt;BR /&gt;       echo "${server} is up"&lt;BR /&gt;    else&lt;BR /&gt;       echo "${server} may have a problem"&lt;BR /&gt;       #perhaps email out a notice.&lt;BR /&gt;    fi&lt;BR /&gt;done &amp;lt; serverlist&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2005 08:10:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905194#M404881</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-06-02T08:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905195#M404882</link>
      <description>U can also use the freely available tool 'expect' for autologin of telnet sessions . Site &lt;A href="http://expect.nist.gov" target="_blank"&gt;http://expect.nist.gov&lt;/A&gt;</description>
      <pubDate>Thu, 02 Jun 2005 08:24:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905195#M404882</guid>
      <dc:creator>Bejoy C Alias</dc:creator>
      <dc:date>2005-06-02T08:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905196#M404883</link>
      <description>Well, expect MIGHT work for this. BUT there is a distinct flaw in the logic here, at least from my perspective.&lt;BR /&gt;&lt;BR /&gt;You could easily script the telnet to other machines.  No problem there.  BUT the problem is what happens when you actually connect to the other machine?  The machine you started the script on will lose control and your script will just sit there because it can't do anything on the remote machine.&lt;BR /&gt;&lt;BR /&gt;So essentially you will successfully telnet to the first host, and then nothing will happen.  It MIGHT proceed to the next host when the telnet connection times out, but no guarantee.&lt;BR /&gt;&lt;BR /&gt;I would look at another way of verifying connectivity.  telnet is not a good test.</description>
      <pubDate>Thu, 02 Jun 2005 08:36:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905196#M404883</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2005-06-02T08:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905197#M404884</link>
      <description>install &lt;A href="http://search.cpan.org/CPAN/authors/id/J/JR/JROGERS/Net-Telnet-3.03.tar.gz" target="_blank"&gt;http://search.cpan.org/CPAN/authors/id/J/JR/JROGERS/Net-Telnet-3.03.tar.gz&lt;/A&gt; into perl.&lt;BR /&gt;&lt;BR /&gt;then create this script:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use Net::Telnet ();&lt;BR /&gt;while (&lt;STDIN&gt;) {&lt;BR /&gt;chop;&lt;BR /&gt;my $remote_host = $_;&lt;BR /&gt;printf("%s:",$remote_host);&lt;BR /&gt;$pop = new Net::Telnet (Timeout =&amp;gt; 10);&lt;BR /&gt;$prev = $pop-&amp;gt;errmode("return");&lt;BR /&gt;$pop-&amp;gt;open(Host =&amp;gt; $remote_host,&lt;BR /&gt;           Port =&amp;gt; 23);&lt;BR /&gt;$msgline = $pop-&amp;gt;errmsg;&lt;BR /&gt;if ($msgline = $pop-&amp;gt;errmsg) {&lt;BR /&gt;   printf("%s.\n",$msgline);&lt;BR /&gt;} else {&lt;BR /&gt;   printf("responded.\n");&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;then to use:&lt;BR /&gt;&lt;BR /&gt;cat FILENAMEOFSYSTEMS | SCRIPTNAME&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr&lt;/STDIN&gt;</description>
      <pubDate>Thu, 02 Jun 2005 08:59:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905197#M404884</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-06-02T08:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905198#M404885</link>
      <description>&lt;BR /&gt;telnet works fine, and you really don't need to login:&lt;BR /&gt;&lt;BR /&gt;Here is some sample INPUT:&lt;BR /&gt;&lt;BR /&gt;[root@vpart1 /]# cat /var/appl/perlscripts/tstports.data&lt;BR /&gt;vpart1&lt;BR /&gt;vpart2&lt;BR /&gt;vpart3&lt;BR /&gt;rndspt01&lt;BR /&gt;rndspt02&lt;BR /&gt;rndspt03&lt;BR /&gt;rndspt09&lt;BR /&gt;&lt;BR /&gt;Here is the OUTPUT:&lt;BR /&gt;&lt;BR /&gt;[root@vpart1 /]# cat /var/appl/perlscripts/tstports.data | /var/appl/perlscripts/tstports.pl&lt;BR /&gt;vpart1:responded.&lt;BR /&gt;vpart2:problem connecting to "vpart2", port 23: connect timed-out.&lt;BR /&gt;vpart3:responded.&lt;BR /&gt;rndspt01:responded.&lt;BR /&gt;rndspt02:responded.&lt;BR /&gt;rndspt03:responded.&lt;BR /&gt;rndspt09:problem connecting to "rndspt09", port 23: Connection refused.&lt;BR /&gt;&lt;BR /&gt;SPECIAL NOTES:&lt;BR /&gt;vpart2 does not exist&lt;BR /&gt;rndspt09 is a WINDOZE box, thus has no telnetd running!&lt;BR /&gt;&lt;BR /&gt;I put the output in the perl prog to use colon's (:) so you can "parse" and grep as you like!!!&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Thu, 02 Jun 2005 09:04:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905198#M404885</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-06-02T09:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905199#M404886</link>
      <description>To install the module:&lt;BR /&gt;&lt;BR /&gt;download it somewhere (anywhere)&lt;BR /&gt;&lt;BR /&gt;gunzip Net-Telnet-3.03.tar.gz&lt;BR /&gt;tar -xvf Net-Telnet-3.03.tar&lt;BR /&gt;cd Net-Telnet-3.03&lt;BR /&gt;perl Makefile.PL&lt;BR /&gt;make&lt;BR /&gt;make test&lt;BR /&gt;make install&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Thu, 02 Jun 2005 09:12:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905199#M404886</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-06-02T09:12:25Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905200#M404887</link>
      <description>As mentioned in earlier post, telnet is not good idea. SSH tools are a better choice and you can execute remote scripts via a ssh session. The script will do the data collection for you and send it back to the initiating server.&lt;BR /&gt;&lt;BR /&gt;You can setup ssh to login to other systems without passwds.&lt;BR /&gt;&lt;BR /&gt;All of this is done encrypted. Much better security.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Jun 2005 09:13:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905200#M404887</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-06-02T09:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905201#M404888</link>
      <description>From what I read of the post, He ONLY wants to see if a server responds to telnet's, NOT EXECUTE ANYTHING so the use of "ssh" is meaningless!&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry d brown jr</description>
      <pubDate>Thu, 02 Jun 2005 09:16:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905201#M404888</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2005-06-02T09:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905202#M404889</link>
      <description>I will use some of the examples from the ones given.</description>
      <pubDate>Thu, 02 Jun 2005 10:10:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-script/m-p/4905202#M404889</guid>
      <dc:creator>Donald C Nelson</dc:creator>
      <dc:date>2005-06-02T10:10:43Z</dc:date>
    </item>
  </channel>
</rss>

