<?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 script assistance in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932962#M410364</link>
    <description>A quick glance - you do not need to specify binary transfer. The sftp handles this fine.&lt;BR /&gt;If you configure the keys you do not need to worry about having the $USER and $PASSWD hardcoded in the script.&lt;BR /&gt;&lt;BR /&gt;Another option could be to use scp. If the file exists then secure copy the file. If the file does not exist, then the logic in the script will indicate this. After all tranfers are completed, you could use ssh to issue the rm command</description>
    <pubDate>Tue, 11 Oct 2005 16:34:48 GMT</pubDate>
    <dc:creator>Rick Garland</dc:creator>
    <dc:date>2005-10-11T16:34:48Z</dc:date>
    <item>
      <title>SFTP script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932961#M410363</link>
      <description>First, I know this should be done with RSA but I need to perform some testing first. Here's what I'm hoping to accomplish:&lt;BR /&gt;&lt;BR /&gt;I'm attempting to automate a process that checks for the existence of files in a top level directory with 4 subdirectories, if it exists, it launches sftp to transfer the file to some location, it validates the send, then deletes the file. The structure would be something like this:&lt;BR /&gt;&lt;BR /&gt;/scproot/dir_out&lt;BR /&gt;/scproot/dir_out/dir1&lt;BR /&gt;/scproot/dir_out/dir2&lt;BR /&gt;/scproot/dir_out/dir3&lt;BR /&gt;/scproot/dir_out/dir4&lt;BR /&gt;&lt;BR /&gt;Each subdirectory may contain *.xml file.&lt;BR /&gt;&lt;BR /&gt;I know this is not secure but it is for testing only at this time:&lt;BR /&gt;&lt;BR /&gt;the sftp portion would be something like&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;HOST='myhost.com'&lt;BR /&gt;USER='username'&lt;BR /&gt;PASSWD='password'&lt;BR /&gt;&lt;BR /&gt;sftp $USER@$HOST &amp;lt;&lt;FILENAME&gt;&lt;/FILENAME&gt;${PASSWD}&lt;BR /&gt;&lt;BR /&gt;binary&lt;BR /&gt;cd /dir1/dir2/&lt;BR /&gt;put some_file&lt;BR /&gt;&lt;BR /&gt;Can someone help me script this appropriately?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 11 Oct 2005 16:22:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932961#M410363</guid>
      <dc:creator>David Bell_1</dc:creator>
      <dc:date>2005-10-11T16:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932962#M410364</link>
      <description>A quick glance - you do not need to specify binary transfer. The sftp handles this fine.&lt;BR /&gt;If you configure the keys you do not need to worry about having the $USER and $PASSWD hardcoded in the script.&lt;BR /&gt;&lt;BR /&gt;Another option could be to use scp. If the file exists then secure copy the file. If the file does not exist, then the logic in the script will indicate this. After all tranfers are completed, you could use ssh to issue the rm command</description>
      <pubDate>Tue, 11 Oct 2005 16:34:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932962#M410364</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-10-11T16:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932963#M410365</link>
      <description>Rick,&lt;BR /&gt;&lt;BR /&gt;Thanks for the information. In this particular case, I will need ot use sftp. I'm actually hoping to make it scp shortly but I can't at this time. The RSA keys will follow in time as well, making the username/passwd unneccesary as you stated. I'm still going to need to create a script to do the search of the directories for *.xml and then do an sftp. Perhaps the sftp could be in a separate script.&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Tue, 11 Oct 2005 16:58:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932963#M410365</guid>
      <dc:creator>David Bell_1</dc:creator>
      <dc:date>2005-10-11T16:58:27Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932964#M410366</link>
      <description>All,&lt;BR /&gt;&lt;BR /&gt;I know I can't pass the password in a configuration file even in batch mode so I'll have to go to RSA key exchnage. However, I would still appreciate some assistance on finding the *.xml files and creating an sftp script that can pass the RSA keys. I would like to use scp but at least for now, I must use sftp.&lt;BR /&gt;&lt;BR /&gt;Thanks for the input.&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Wed, 12 Oct 2005 12:40:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932964#M410366</guid>
      <dc:creator>David Bell_1</dc:creator>
      <dc:date>2005-10-12T12:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP script assistance</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932965#M410367</link>
      <description>I have written the script using "expect" for the time being until I can exchnage RSA Keys.</description>
      <pubDate>Thu, 13 Oct 2005 12:12:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sftp-script-assistance/m-p/4932965#M410367</guid>
      <dc:creator>David Bell_1</dc:creator>
      <dc:date>2005-10-13T12:12:32Z</dc:date>
    </item>
  </channel>
</rss>

