<?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: How to use host commands in an ftp session in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249661#M891876</link>
    <description>&lt;BR /&gt;A. Clay Stephenson Thanks for your reply. I am trying to log from machine A to machine B. I using the user "ftp_user" to login to the remomte machine "B" . ftp_user has an account on B but he doesn't have an account on A. Since "ftp_user" doesn't have an account on A I can't make it the owner of .netrc file. I hope I understand what you are tyring to say..&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Suman</description>
    <pubDate>Thu, 15 Apr 2004 16:43:35 GMT</pubDate>
    <dc:creator>Suman_7</dc:creator>
    <dc:date>2004-04-15T16:43:35Z</dc:date>
    <item>
      <title>How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249652#M891867</link>
      <description>1. Is it possible to use UNIX host commands in an ftp session?&lt;BR /&gt;&lt;BR /&gt;like ...&lt;BR /&gt;&lt;BR /&gt;$ftp&amp;gt; grep *.*&lt;BR /&gt;&lt;BR /&gt;2. what is the command to connect from one UNIX host to another UNIX box ..&lt;BR /&gt;&lt;BR /&gt;like telnet &lt;BOXNAME&gt; &lt;USERNAME&gt; &lt;PASSWORD&gt;&lt;BR /&gt;&lt;BR /&gt;I tried the same its not working. Please advice.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Suman&lt;/PASSWORD&gt;&lt;/USERNAME&gt;&lt;/BOXNAME&gt;</description>
      <pubDate>Thu, 15 Apr 2004 14:28:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249652#M891867</guid>
      <dc:creator>Suman_7</dc:creator>
      <dc:date>2004-04-15T14:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249653#M891868</link>
      <description>Suman,&lt;BR /&gt;&lt;BR /&gt;In answer to question 2 the answer&lt;BR /&gt;is telnet &lt;BOXNAME&gt;&lt;BR /&gt;wait for user name: type&lt;BR /&gt;wait for password and type&lt;BR /&gt;&lt;BR /&gt;if you want to log in automatically, you have to look at rlogin, or some variation of that.&lt;BR /&gt;&lt;BR /&gt;I am also not completely clear, what your first question is, so if you can elaborate, i may be able to answer&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Scott&lt;/BOXNAME&gt;</description>
      <pubDate>Thu, 15 Apr 2004 14:34:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249653#M891868</guid>
      <dc:creator>Scott Palmer_1</dc:creator>
      <dc:date>2004-04-15T14:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249654#M891869</link>
      <description>as a sub answer to part 2,  if you put a 2nd argument in the telnet after the boxname (or ipaddress) it sees it as a port number&lt;BR /&gt;for example telnet 127.0.0.1 5555 would telnet to port 5555 on your local machine (HP Data Protector daemon port).&lt;BR /&gt;&lt;BR /&gt;Scott</description>
      <pubDate>Thu, 15 Apr 2004 14:36:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249654#M891869</guid>
      <dc:creator>Scott Palmer_1</dc:creator>
      <dc:date>2004-04-15T14:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249655#M891870</link>
      <description>For security reasons, ftp is not permitted to run host commands like telnet. A lot of effort has been made to make sure this is so.&lt;BR /&gt;&lt;BR /&gt;Here is a script that can do this:&lt;BR /&gt;&lt;BR /&gt;########################&lt;BR /&gt;#Start Ftp and get file#&lt;BR /&gt;########################&lt;BR /&gt;ftp -nv ${SERVER} &amp;lt;&amp;lt; FTPEOF &amp;gt; /tmp/temp_log.$$&lt;BR /&gt;user ${USERNAME} ${PASSWORD}&lt;BR /&gt;#Get file&lt;BR /&gt;get $1&lt;BR /&gt;bye&lt;BR /&gt;FTPEOF&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You can insert commands before the ftp line or avter the FTPEOF statement, but not in the middle.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 15 Apr 2004 14:37:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249655#M891870</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2004-04-15T14:37:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249656#M891871</link>
      <description>Thanks for your reply.&lt;BR /&gt;&lt;BR /&gt;How do I use rlogin&lt;BR /&gt;&lt;BR /&gt;I am trying &lt;BR /&gt;$rlogin &amp;lt; remote hostname&amp;gt; &amp;lt;-l username&amp;gt;&lt;BR /&gt;&lt;BR /&gt;but it comes back asking for password. I need to write a script to connect to remote box without being prompted for username or password. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have to do a complex logic to check the availability of specific file name pattern on the remote box. If the file is not available then my script has to come back again to this box after 30 minutes and check again.&lt;BR /&gt;&lt;BR /&gt;Please advice.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Suman</description>
      <pubDate>Thu, 15 Apr 2004 14:56:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249656#M891871</guid>
      <dc:creator>Suman_7</dc:creator>
      <dc:date>2004-04-15T14:56:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249657#M891872</link>
      <description>to use rlogin, you would need to setup .rhosts for the user running the script on the target machine. In said users home directory. &lt;BR /&gt;&lt;BR /&gt;So my .rhosts would look be something like this.&lt;BR /&gt;/home/mstrong/.rhosts&lt;BR /&gt;permissions 644 &lt;BR /&gt;&lt;BR /&gt;The contents of the file look as follows:&lt;BR /&gt;athena mstrong&lt;BR /&gt;&lt;BR /&gt;where athena would be the remote host, and mstrong would be the username on that host.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Apr 2004 15:53:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249657#M891872</guid>
      <dc:creator>Marvin Strong</dc:creator>
      <dc:date>2004-04-15T15:53:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249658#M891873</link>
      <description>Mavin,&lt;BR /&gt;&lt;BR /&gt;thanks for your reply. But my question is about the password. How can I avoid being prompted for password. Can i save this password somewhere? Please advice?&lt;BR /&gt;&lt;BR /&gt;I tried using &lt;BR /&gt;$rlogin &lt;REMOTE box="" name=""&gt; -l &lt;USERNAME&gt;&lt;BR /&gt;&lt;BR /&gt;Ss there any way I can specify the password in the same command line?&lt;BR /&gt;&lt;BR /&gt;I have to write a script that will connect to the remote box without being prompted for username and password.&lt;BR /&gt;&lt;BR /&gt;Thank You,&lt;BR /&gt;Suman&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thank You,&lt;BR /&gt;Suman Kumar&lt;/USERNAME&gt;&lt;/REMOTE&gt;</description>
      <pubDate>Thu, 15 Apr 2004 16:10:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249658#M891873</guid>
      <dc:creator>Suman_7</dc:creator>
      <dc:date>2004-04-15T16:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249659#M891874</link>
      <description>Actually, what you want to do is very easy using Perl Net::FTP module.&lt;BR /&gt;&lt;BR /&gt;Create a .netrc file on the host containing an entry like this in the FTP clients home directory, it should have mode 600 and be owned by the user (dumbo, in this case):&lt;BR /&gt;&lt;BR /&gt;machine bozo login dumbo passwd elephant&lt;BR /&gt;&lt;BR /&gt;No password will then be need by rhe "r" commands, FTP, or Perl using these commands. Now use the attached script to attempt to get the file "ears" from directory "/trunk" on host "bozo".&lt;BR /&gt;&lt;BR /&gt;ftpget.pl -h bozo -l dumbo -d /trunk ears&lt;BR /&gt;STAT=${?}&lt;BR /&gt;&lt;BR /&gt;if [[ ${STAT} -eq 0 ]]&lt;BR /&gt;then&lt;BR /&gt;echo "All ok"&lt;BR /&gt;else&lt;BR /&gt;echo "Failed; status = ${STAT}; try again later"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;That's all you have to do; if "ears" isn't found, the result is 5.&lt;BR /&gt;&lt;BR /&gt;Because Net::FTP also has the ls and dir FTP commands, you can make this script as powerful as you like.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Apr 2004 16:12:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249659#M891874</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-04-15T16:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249660#M891875</link>
      <description>the .rhost is used to declare host as recognize, i.e. whithout the need of authentification process.&lt;BR /&gt;&lt;BR /&gt;Put the remote host first, then the username.&lt;BR /&gt;# cat &amp;gt;.rhosts&lt;BR /&gt;localhost  bob&lt;BR /&gt;^D&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Nicolas</description>
      <pubDate>Thu, 15 Apr 2004 16:19:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249660#M891875</guid>
      <dc:creator>Nicolas Dumeige</dc:creator>
      <dc:date>2004-04-15T16:19:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249661#M891876</link>
      <description>&lt;BR /&gt;A. Clay Stephenson Thanks for your reply. I am trying to log from machine A to machine B. I using the user "ftp_user" to login to the remomte machine "B" . ftp_user has an account on B but he doesn't have an account on A. Since "ftp_user" doesn't have an account on A I can't make it the owner of .netrc file. I hope I understand what you are tyring to say..&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;Suman</description>
      <pubDate>Thu, 15 Apr 2004 16:43:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249661#M891876</guid>
      <dc:creator>Suman_7</dc:creator>
      <dc:date>2004-04-15T16:43:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249662#M891877</link>
      <description>The ownership of the .netrc file must be whatever user is executing the FTP client; however, the logname on the remote machine can be anything. FTP looks in the .netrc file on the client for a matching machine and login name (for the remote machine) and uses the password in the .netrc file just as though you typed all of that in.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Apr 2004 16:50:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249662#M891877</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-04-15T16:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249663#M891878</link>
      <description>I am trying to use the ftpget.pl and I get this error message. I am new to perl.&lt;BR /&gt;&lt;BR /&gt;Use of reserved word "our" is deprecated at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_h" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_l" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_a" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_p" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_B" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_A" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_d" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_s" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_t" requires explicit package name at ./myftpget.pl line 87.&lt;BR /&gt;Global symbol "$opt_v" requires explicit package name at ./myftpget.pl line 88.&lt;BR /&gt;Global symbol "$opt_u" requires explicit package name at ./myftpget.pl line 88.&lt;BR /&gt;Global symbol "$opt_z" requires explicit package name at ./myftpget.pl line 88.&lt;BR /&gt;Execution of ./myftpget.pl aborted due to compilation errors.&lt;BR /&gt;Failed; status = 255; try again later&lt;BR /&gt;&lt;BR /&gt;Please advice&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Suman&lt;BR /&gt;</description>
      <pubDate>Fri, 16 Apr 2004 12:13:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249663#M891878</guid>
      <dc:creator>Suman_7</dc:creator>
      <dc:date>2004-04-16T12:13:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use host commands in an ftp session</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249664#M891879</link>
      <description>You are running a very old version of Perl. This is probably Perl 4 in /usr/contrib. Either install Perl from your application CD's or download from &lt;A href="http://www.perl.org/CPAN" target="_blank"&gt;www.perl.org/CPAN&lt;/A&gt; or&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Languages/perl-5.8.3/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Languages/perl-5.8.3/&lt;/A&gt;</description>
      <pubDate>Fri, 16 Apr 2004 13:05:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-use-host-commands-in-an-ftp-session/m-p/3249664#M891879</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-04-16T13:05:16Z</dc:date>
    </item>
  </channel>
</rss>

