<?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: SFTP using expect script (02) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380045#M747820</link>
    <description>Hi Eric, &lt;BR /&gt;&lt;BR /&gt;Thanks alot for your help. &lt;BR /&gt;&lt;BR /&gt;It looks fine for me now. I can avoid the hard-coded password from the script and put it into a hidden file. Even it is not 100% secure, but it is much better than hard-code the password in the script. &lt;BR /&gt;&lt;BR /&gt;Thanks alot.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Negara</description>
    <pubDate>Thu, 16 Sep 2004 04:27:50 GMT</pubDate>
    <dc:creator>Dewa Negara_4</dc:creator>
    <dc:date>2004-09-16T04:27:50Z</dc:date>
    <item>
      <title>SFTP using expect script (02)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380042#M747817</link>
      <description>Hi ALl, &lt;BR /&gt;&lt;BR /&gt;Sorry I post this again since I still can not find the answer. &lt;BR /&gt;&lt;BR /&gt;I am running SFTP using expect script below as my company has not decided yet using public/private keys :&lt;BR /&gt;&lt;BR /&gt;#!/usr/local/bin/expect&lt;BR /&gt;spawn sftp -b batchFile &lt;USER&gt;@&lt;REMOTEHOSTS&gt;&lt;BR /&gt;expect "password:"&lt;BR /&gt;send "&lt;PASSWORD&gt;\n";&lt;BR /&gt;interact&lt;BR /&gt;&lt;BR /&gt;Is there any way how to prevent from hard-coded password in the script? Can we hidden the password? I just want to mitigate the security risk for the script. &lt;BR /&gt;&lt;BR /&gt;Pls help. High score will be given. &lt;BR /&gt;&lt;BR /&gt;Thanks and Best Regards,&lt;BR /&gt;Negara&lt;/PASSWORD&gt;&lt;/REMOTEHOSTS&gt;&lt;/USER&gt;</description>
      <pubDate>Wed, 15 Sep 2004 22:27:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380042#M747817</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2004-09-15T22:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP using expect script (02)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380043#M747818</link>
      <description>Hi Negara,&lt;BR /&gt;&lt;BR /&gt;Are you using this from cron or interactive?&lt;BR /&gt;What if you vi a script wich sets the password to a variable like: MYPW=12ab34cd. Give this script root:sys rights and r-x------&lt;BR /&gt;&lt;BR /&gt;Then execute this script before the sftp session, and afterwards set the password again to some dummy pwd. You can also put the script file to some place where ordinary users cannot get.&lt;BR /&gt;&lt;BR /&gt;Regards, MB.</description>
      <pubDate>Thu, 16 Sep 2004 01:40:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380043#M747818</guid>
      <dc:creator>Marcel Boogert_1</dc:creator>
      <dc:date>2004-09-16T01:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP using expect script (02)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380044#M747819</link>
      <description>Hi Dewa,&lt;BR /&gt;&lt;BR /&gt;Check Michael Tully's reply in this thread: &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=350086" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=350086&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Eric Antunes</description>
      <pubDate>Thu, 16 Sep 2004 03:36:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380044#M747819</guid>
      <dc:creator>Eric Antunes</dc:creator>
      <dc:date>2004-09-16T03:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP using expect script (02)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380045#M747820</link>
      <description>Hi Eric, &lt;BR /&gt;&lt;BR /&gt;Thanks alot for your help. &lt;BR /&gt;&lt;BR /&gt;It looks fine for me now. I can avoid the hard-coded password from the script and put it into a hidden file. Even it is not 100% secure, but it is much better than hard-code the password in the script. &lt;BR /&gt;&lt;BR /&gt;Thanks alot.&lt;BR /&gt;&lt;BR /&gt;Best Regards,&lt;BR /&gt;Negara</description>
      <pubDate>Thu, 16 Sep 2004 04:27:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380045#M747820</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2004-09-16T04:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP using expect script (02)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380046#M747821</link>
      <description>Hi Dewa,&lt;BR /&gt;It seems that you got the answer. Could you give me the sample. Our company also need to use sftp without public/private keys. I have the situation the same as yours. Many thanks for your help !!&lt;BR /&gt;:)</description>
      <pubDate>Thu, 04 Nov 2004 23:05:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380046#M747821</guid>
      <dc:creator>Iris_10</dc:creator>
      <dc:date>2004-11-04T23:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP using expect script (02)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380047#M747822</link>
      <description>Hi Iris, &lt;BR /&gt;&lt;BR /&gt;I use the script below. It looks fine so far. Hope this help.&lt;BR /&gt;&lt;BR /&gt;Thanks.&lt;BR /&gt;Dewa&lt;BR /&gt;&lt;BR /&gt;#!/usr/local/bin/expect&lt;BR /&gt;&lt;BR /&gt;# Initialisation&lt;BR /&gt;set authFile "/home/myuser/transfer/.password"&lt;BR /&gt;&lt;BR /&gt;# Check the authorisation file exists&lt;BR /&gt;if {![file exists $authFile]} {  ;# Does file exist&lt;BR /&gt; send_user "$authFile does not exist; aborting\n"&lt;BR /&gt; exit 1&lt;BR /&gt;}&lt;BR /&gt;set fileFD [open $authFile r]                   ;# Open the auth file&lt;BR /&gt;gets $fileFD authLine                           ;# Read in 1 line to authLine&lt;BR /&gt;close $fileFD&lt;BR /&gt;&lt;BR /&gt;# Transfer file(s)&lt;BR /&gt;spawn sftp -b batchFile user01@hostname&lt;BR /&gt;expect "password:"&lt;BR /&gt;send "$authLine\n";&lt;BR /&gt;interact&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Nov 2004 04:28:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-using-expect-script-02/m-p/3380047#M747822</guid>
      <dc:creator>Dewa Negara_4</dc:creator>
      <dc:date>2004-11-05T04:28:46Z</dc:date>
    </item>
  </channel>
</rss>

