<?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 through script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995944#M423367</link>
    <description>Hi All&lt;BR /&gt;&lt;BR /&gt;  Thankx a lot now I'm using ssh and trying to execute the commands and it really works fine.</description>
    <pubDate>Wed, 09 Aug 2006 06:37:50 GMT</pubDate>
    <dc:creator>jayachandran.g</dc:creator>
    <dc:date>2006-08-09T06:37:50Z</dc:date>
    <item>
      <title>Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995937#M423360</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt;    I want to write a unix script to login to a remote host and to collect logs.&lt;BR /&gt;&lt;BR /&gt;    But once telnet session is started then my script is not running.. once the telnet is closed my script runs.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;  please help to write  a script so that I would be able to fire a telnet command through script.&lt;BR /&gt;&lt;BR /&gt;Thanks and Regards&lt;BR /&gt;Jayachandran,G&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Aug 2006 02:15:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995937#M423360</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2006-08-08T02:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995938#M423361</link>
      <description>google for Expect&lt;BR /&gt;or use Perl Net::Telnet,&lt;BR /&gt;or even the Perl Expect if you don't like tcl</description>
      <pubDate>Tue, 08 Aug 2006 03:29:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995938#M423361</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2006-08-08T03:29:08Z</dc:date>
    </item>
    <item>
      <title>Re: Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995939#M423362</link>
      <description>Hi,&lt;BR /&gt;as an alternative to setting up a telnet session via expect, have you thought about remsh or just collecting the logs via ftp.</description>
      <pubDate>Tue, 08 Aug 2006 04:16:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995939#M423362</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-08-08T04:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995940#M423363</link>
      <description>Hi &lt;BR /&gt;&lt;BR /&gt;  To add some more details..&lt;BR /&gt;&lt;BR /&gt; I'm trying from solaris server.....&lt;BR /&gt;&lt;BR /&gt;Peter&lt;BR /&gt;&lt;BR /&gt;both cmd execution and ftp log file collection must be done in order to reach my goal.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; Once I have used  normal telnet commands script with some sleep option..... &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Aug 2006 04:42:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995940#M423363</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2006-08-08T04:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995941#M423364</link>
      <description>Personally I would just setup ssh keys. and  use scp. No scripted passwords, or anything that way.</description>
      <pubDate>Tue, 08 Aug 2006 06:32:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995941#M423364</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2006-08-08T06:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995942#M423365</link>
      <description>As Marvin has told before, the ssh keys is probably the best in order to copy the files in a secure way.&lt;BR /&gt;&lt;BR /&gt;But as you have to execute a command before I think you will need the expect script so probably it would be better to use it for the full task.&lt;BR /&gt;&lt;BR /&gt;Anyway, be concious that the expect script must contain username and password, so be concious about the security issues it would mean.</description>
      <pubDate>Tue, 08 Aug 2006 07:49:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995942#M423365</guid>
      <dc:creator>Alfredo Garcia Martino</dc:creator>
      <dc:date>2006-08-08T07:49:00Z</dc:date>
    </item>
    <item>
      <title>Re: Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995943#M423366</link>
      <description>No need to fumble with Expect and/or telnet.&lt;BR /&gt;You can easily combine remote command execution and secure copying of files just using ssh&lt;BR /&gt;(there's absolutely no need for scp if you need to copy files).&lt;BR /&gt;In fact this is how I transfer (in a trusted network) public keys for passwordless logins.&lt;BR /&gt; &lt;BR /&gt;First you need to create a pair of either DSA or RSA keys (probably both won't hurt).&lt;BR /&gt;If you have never before initiated an ssh session on your solaris box before then most likely $HOME/.ssh subdir is missing.&lt;BR /&gt;You can create it manually but because of the pickiness of ssh with file ownerships and permissions (if strictmodes is enabled, as should be the case) it's better to have ssh it done for you.&lt;BR /&gt;Therefore you only need to connect to another ssh host (no login there required), and accept its hostkey (in a hostile environment you should double check the issued fingerprint of the remote host key)&lt;BR /&gt;e.g.&lt;BR /&gt; &lt;BR /&gt;$ ssh someuser@somesshhost&lt;BR /&gt; &lt;BR /&gt;If you accepted the hostkey you will find a .ssh dir in your $HOME together with a known_hosts file, all with correct mode bits.&lt;BR /&gt; &lt;BR /&gt;Next generate a pair of keys.&lt;BR /&gt; &lt;BR /&gt;$ ssh-keygen -t rsa -b 1024 -N "" -f ~/.ssh/id_rsa&lt;BR /&gt; &lt;BR /&gt;should generate a passphraseless RSA key pair.&lt;BR /&gt;Now on the other Solaris box where you remotely want to execute commands or copy files you need to place the public key of the just generated pair in some user's $HOME/.ssh/authorized_keys file that you have access to.&lt;BR /&gt;Let's assume you have root access there (but this isn't necesarry) just to show how to copy files without requiring scp.&lt;BR /&gt; &lt;BR /&gt;$ ssh root@otherbox 'cat &amp;gt;&amp;gt;~otheruser/.ssh/authorized_keys' &amp;lt; ~/.ssh/id_rsa.pub&lt;BR /&gt; &lt;BR /&gt;Similarily, you can recursively copy whole directory trees by just executing ssh commands remotely (in the very simple example above the cat command).&lt;BR /&gt;You can also combine several commands by separating them with quoted simicolons.&lt;BR /&gt;You only have to be careful to quote any meta character that should be executed on the remote box to prevent your local shell from interpreting it.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Aug 2006 08:32:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995943#M423366</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2006-08-08T08:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995944#M423367</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt;  Thankx a lot now I'm using ssh and trying to execute the commands and it really works fine.</description>
      <pubDate>Wed, 09 Aug 2006 06:37:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995944#M423367</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2006-08-09T06:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Telnet through script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995945#M423368</link>
      <description>thankx a lot to all.......</description>
      <pubDate>Wed, 09 Aug 2006 06:38:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/telnet-through-script/m-p/4995945#M423368</guid>
      <dc:creator>jayachandran.g</dc:creator>
      <dc:date>2006-08-09T06:38:23Z</dc:date>
    </item>
  </channel>
</rss>

