<?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: Automating telnet script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472252#M212014</link>
    <description>Tim,&lt;BR /&gt;I think the following should work, i don't have access to a Unix system right now to verify&lt;BR /&gt;&lt;BR /&gt;$ telnet 11.11.111.111&lt;BR /&gt;USERNAME&lt;BR /&gt;PASSWORD&lt;BR /&gt;sh dialer&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;$ telnet 11.11.111.111 USERNAME PASSWORD&lt;BR /&gt;sh dialer&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;Try and let me know if one of the above works&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Mobeen</description>
    <pubDate>Thu, 27 Jan 2005 04:35:17 GMT</pubDate>
    <dc:creator>Mobeen_1</dc:creator>
    <dc:date>2005-01-27T04:35:17Z</dc:date>
    <item>
      <title>Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472251#M212013</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm on HPUX 11.11i. Does anyone know if it is possible to automate a telnet script &amp;amp; pass in the username, password &amp;amp; a command and the exit. For testing purposes, I need to write a script to telnet to a router &amp;amp; run the command  "sh dialer". I can't seem to find a way to pass the details to telnet from a file.&lt;BR /&gt;what I need to do in words is:&lt;BR /&gt;telnet 11.11.111.111        (i.e. IP address)&lt;BR /&gt;input USERNAME&lt;BR /&gt;input PASSWORD&lt;BR /&gt;sh dialer&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;This will be run in the crontab overnight &amp;amp; thescreen output send to a log file for monitoring&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Thu, 27 Jan 2005 04:22:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472251#M212013</guid>
      <dc:creator>Tim O'Connell</dc:creator>
      <dc:date>2005-01-27T04:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472252#M212014</link>
      <description>Tim,&lt;BR /&gt;I think the following should work, i don't have access to a Unix system right now to verify&lt;BR /&gt;&lt;BR /&gt;$ telnet 11.11.111.111&lt;BR /&gt;USERNAME&lt;BR /&gt;PASSWORD&lt;BR /&gt;sh dialer&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;OR&lt;BR /&gt;&lt;BR /&gt;$ telnet 11.11.111.111 USERNAME PASSWORD&lt;BR /&gt;sh dialer&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;Try and let me know if one of the above works&lt;BR /&gt;&lt;BR /&gt;rgds&lt;BR /&gt;Mobeen</description>
      <pubDate>Thu, 27 Jan 2005 04:35:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472252#M212014</guid>
      <dc:creator>Mobeen_1</dc:creator>
      <dc:date>2005-01-27T04:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472253#M212015</link>
      <description>Tim,&lt;BR /&gt;the normal way for doing this in a production environment would be via expect.&lt;BR /&gt;See &lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=45609" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=45609&lt;/A&gt;&lt;BR /&gt;for solution of your problem.&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 27 Jan 2005 04:36:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472253#M212015</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-01-27T04:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472254#M212016</link>
      <description>Sorry, Mobeen&lt;BR /&gt;&lt;BR /&gt;The telnet commands did'nt work&lt;BR /&gt;&lt;BR /&gt;Will look at Expect.&lt;BR /&gt;&lt;BR /&gt;Points assigned&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Thu, 27 Jan 2005 05:55:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472254#M212016</guid>
      <dc:creator>Tim O'Connell</dc:creator>
      <dc:date>2005-01-27T05:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472255#M212017</link>
      <description>expect script sample&lt;BR /&gt;&lt;BR /&gt;#!/usr/local/bin/expect -f&lt;BR /&gt;spawn telnet 123.123.123.123&lt;BR /&gt;expect "login:"&lt;BR /&gt;send "snoopy\r"&lt;BR /&gt;expect "Password:"&lt;BR /&gt;send "snoopy\r"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 30 Jan 2005 22:19:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472255#M212017</guid>
      <dc:creator>Matthew_50</dc:creator>
      <dc:date>2005-01-30T22:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472256#M212018</link>
      <description>This is a BAD idea: don't do it!  It reflects poor system security practice.  Telnet sends passwords unencrypted.  If telnet is the only connection offered by the router, your system is badly out of date.  &lt;BR /&gt;&lt;BR /&gt;Try echo  "$USERNAME\r$PASSWORD\r$COMMAND"|telnet HOST. &lt;BR /&gt;(The \r is the equivalent of the &lt;RETURN&gt; key.  If this doesn't work, try \013 instead of the \r.  The \013 is the octal equivalent of the &lt;RETURN&gt; key.)&lt;BR /&gt;&lt;BR /&gt;This is really ugly, but might work for you. I can't test this on any of my systems here or the security people would have my head on a platter--and rightfully so.&lt;/RETURN&gt;&lt;/RETURN&gt;</description>
      <pubDate>Mon, 31 Jan 2005 17:38:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472256#M212018</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2005-01-31T17:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472257#M212019</link>
      <description>Oops: I told you wrong. The octal equivalent of \r is \015, not \013.  Sometimes I confuse myself.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Chris</description>
      <pubDate>Mon, 31 Jan 2005 17:58:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472257#M212019</guid>
      <dc:creator>Chris Vail</dc:creator>
      <dc:date>2005-01-31T17:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472258#M212020</link>
      <description>AFAIK, "echo usrname\rpasswd | telnet HOST" does&lt;BR /&gt;not work for telnet as telnet, by default, reads from&lt;BR /&gt;tty.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Jan 2005 18:08:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472258#M212020</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-01-31T18:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Automating telnet script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472259#M212021</link>
      <description>Thanks for all the replies. I know telnet has its holes but I won't be running this for long. I am trying to determine which pc's are bringing up the ISDN lines at night.  I got it working by doing the following: (PASSWORD is the password on the router)&lt;BR /&gt;&lt;BR /&gt;router=99.99.999.99&lt;BR /&gt;(echo PASSWORD&lt;BR /&gt;sleep 2&lt;BR /&gt;echo sh isdn act&lt;BR /&gt;sleep 2&lt;BR /&gt;echo exit&lt;BR /&gt;while read cmd&lt;BR /&gt;do&lt;BR /&gt;echo $cmd&lt;BR /&gt;done&lt;BR /&gt;)|telnet $router | tee /tmp/ky_routers_up.log&lt;BR /&gt;&lt;BR /&gt;Points awarded,&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Tue, 01 Feb 2005 04:54:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/automating-telnet-script/m-p/3472259#M212021</guid>
      <dc:creator>Tim O'Connell</dc:creator>
      <dc:date>2005-02-01T04:54:56Z</dc:date>
    </item>
  </channel>
</rss>

