<?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: Replace .netrc file in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607288#M233876</link>
    <description>For scp and sftp you have to setup key sharing between machines or use expect scripting to do it easily.&lt;BR /&gt;&lt;BR /&gt;You can use variable substition in sftp and scp also. All utility will be coming under SHELL. If you make shell variables then it will be applicable to the present shell globally.&lt;BR /&gt;&lt;BR /&gt;You can try it as,&lt;BR /&gt;&lt;BR /&gt;REM_USER="root"&lt;BR /&gt;REM_HOST="remote"&lt;BR /&gt;REM_LOCATION="/tmp"&lt;BR /&gt;LOCAL_LOC="/tmp/test"&lt;BR /&gt;&lt;BR /&gt;scp ${REM_USER}@${REM_HOST}:${REM_LOCATION}  ${LOCAL_LOC}&lt;BR /&gt;&lt;BR /&gt;hth.</description>
    <pubDate>Fri, 19 Aug 2005 00:31:42 GMT</pubDate>
    <dc:creator>Muthukumar_5</dc:creator>
    <dc:date>2005-08-19T00:31:42Z</dc:date>
    <item>
      <title>Replace .netrc file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607286#M233874</link>
      <description>Hi All, &lt;BR /&gt;&lt;BR /&gt;I have a FTP script that is using .netrc file. I do not want to use .netrc file anymore because of security reasons and want to replace the FTP script with using sftp or scp since the boxes have been installed SSH. Below is the .netrc file and FTP command taken from the FTP script.&lt;BR /&gt;&lt;BR /&gt;[root@SERV_01:/home/ARPSIOA]&lt;BR /&gt;# more .netrc&lt;BR /&gt;machine SERV_02&lt;BR /&gt;login aigposda&lt;BR /&gt;password aigpos01&lt;BR /&gt;macdef filetransfer&lt;BR /&gt;cd $1&lt;BR /&gt;bin&lt;BR /&gt;put $2&lt;BR /&gt;chmod 644 $2&lt;BR /&gt;put $3&lt;BR /&gt;chmod 644 $3&lt;BR /&gt;quit&lt;BR /&gt;&lt;BR /&gt;FTP command taken from the script :&lt;BR /&gt; echo "\$ filetransfer ${GPOS_IN_DIR} 793_oc_${TIME_ST}.stop 793_od_${TIME_ST}.stop " | ftp ${GPOS_SER_NM}&lt;BR /&gt;&lt;BR /&gt;Pls Note that FTP command above is using some variabels. &lt;BR /&gt;&lt;BR /&gt;What kind of sftp or scp commands can I use to replace the FTP command above? Can we use sftp or scp command with some varibles as well?&lt;BR /&gt;&lt;BR /&gt;Please help. High score will be given. &lt;BR /&gt;&lt;BR /&gt;Thanks alot in advance. &lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Dewa&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Aug 2005 23:46:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607286#M233874</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2005-08-18T23:46:30Z</dc:date>
    </item>
    <item>
      <title>Re: Replace .netrc file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607287#M233875</link>
      <description>If you use scp which is very simple and easy to configure. Also since it uses encrypted channel its more secure and if you use it with the certificate keys you dont need to provide the password.&lt;BR /&gt;Here is how it works...&lt;BR /&gt;On the client machine, generate the public keys using ssh-keygen command and once you have the public key with the extension .pub copy that to the server (remote host running sshd) in the home directory of the user create a file called authorized_keys in ~user/.ssh directory and put the content of the .pub file in it.&lt;BR /&gt;By and change the mode of the file to 600.&lt;BR /&gt;By doing this you can test by loging in using ssh &lt;HOSTNAME&gt;, it wont ask for the password.&lt;BR /&gt;And its now you can write a script to scp your files without the worry of password.&lt;/HOSTNAME&gt;</description>
      <pubDate>Fri, 19 Aug 2005 00:29:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607287#M233875</guid>
      <dc:creator>Rajeev  Shukla</dc:creator>
      <dc:date>2005-08-19T00:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Replace .netrc file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607288#M233876</link>
      <description>For scp and sftp you have to setup key sharing between machines or use expect scripting to do it easily.&lt;BR /&gt;&lt;BR /&gt;You can use variable substition in sftp and scp also. All utility will be coming under SHELL. If you make shell variables then it will be applicable to the present shell globally.&lt;BR /&gt;&lt;BR /&gt;You can try it as,&lt;BR /&gt;&lt;BR /&gt;REM_USER="root"&lt;BR /&gt;REM_HOST="remote"&lt;BR /&gt;REM_LOCATION="/tmp"&lt;BR /&gt;LOCAL_LOC="/tmp/test"&lt;BR /&gt;&lt;BR /&gt;scp ${REM_USER}@${REM_HOST}:${REM_LOCATION}  ${LOCAL_LOC}&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Fri, 19 Aug 2005 00:31:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607288#M233876</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-08-19T00:31:42Z</dc:date>
    </item>
    <item>
      <title>Re: Replace .netrc file</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607289#M233877</link>
      <description>Hi All, &lt;BR /&gt;&lt;BR /&gt;Got it. Thanks alot for your help. &lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Dewa&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Aug 2005 02:00:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/replace-netrc-file/m-p/3607289#M233877</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2005-08-19T02:00:14Z</dc:date>
    </item>
  </channel>
</rss>

