<?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: Using SFTP in a batch job in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777766#M60653</link>
    <description>Some specifics:&lt;BR /&gt;&lt;BR /&gt;My VMS system is the client, and I do not know the OS and such of the server.&lt;BR /&gt;&lt;BR /&gt;I've produced private and public keys, and moved a copy of the public key to the remote server, using the directories Steven had already created in his testing.&lt;BR /&gt;&lt;BR /&gt;I can now perform a SFTP connection without using password, and I can perform a SFTP connection using a batch file.&lt;BR /&gt;&lt;BR /&gt;MANY THANKS TO STEVEN SCHWEDA FOR THE HELP AND EXAMPLES.&lt;BR /&gt;&lt;BR /&gt;Working from my own user account, with it's default directory on the system disk, I get the following when executing the command file in a batch job.&lt;BR /&gt;&lt;BR /&gt;-----------&lt;BR /&gt;C.COM&lt;BR /&gt;$ set verify&lt;BR /&gt;$&lt;BR /&gt;$ SFTP "-B" C.BAT fsrbi@209.172.179.22&lt;BR /&gt;------------&lt;BR /&gt;C.BAT&lt;BR /&gt;pwd&lt;BR /&gt;ls&lt;BR /&gt;ls "-R"&lt;BR /&gt;quit&lt;BR /&gt;------------&lt;BR /&gt;C.LOG&lt;BR /&gt;$ Set NoOn&lt;BR /&gt;$&lt;BR /&gt;$ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY"))&lt;BR /&gt;Performing SYS$MANAGER:SYLOGIN.COM ...&lt;BR /&gt;Performing [DFE]LOGIN.COM ....&lt;BR /&gt;$&lt;BR /&gt;$ SFTP "-B" C.BAT fsrbi@209.172.179.22&lt;BR /&gt;sftp&amp;gt; pwd&lt;BR /&gt;/&lt;BR /&gt;sftp&amp;gt; ls&lt;BR /&gt;Warning: Failed to set terminal mode to PASTHRU in sftp.&lt;BR /&gt;sftp&amp;gt; ls "-R"&lt;BR /&gt;Warning: Failed to set terminal mode to PASTHRU in sftp.&lt;BR /&gt;sftp&amp;gt; quit&lt;BR /&gt;  DFE          job terminated at 25-APR-2011 19:31:58.73&lt;BR /&gt;-----------&lt;BR /&gt;&lt;BR /&gt;What I'm using:&lt;BR /&gt;&lt;BR /&gt;BRYCE&amp;gt; tcpip show version&lt;BR /&gt; &lt;BR /&gt;  HP TCP/IP Services for OpenVMS Alpha Version V5.6&lt;BR /&gt;  on an AlphaStation 200 4/233 running OpenVMS V8.3&lt;BR /&gt; &lt;BR /&gt;BRYCE&amp;gt; sftp -v&lt;BR /&gt;Sftp2/SFTP2.C:4543: CRTL version (SYS$SHARE:DECC$SHARE ident) is: V8.3-00&lt;BR /&gt; &lt;BR /&gt;SshFileCopy/SSHFILECOPY.C:1080: Making local connection.&lt;BR /&gt;Ssh2SftpServer/SSHFILEXFERS.C:1754: Received SSH_FXP_INIT&lt;BR /&gt;Ssh2SftpServer/SSHFILEXFERS.C:1799: version is 3&lt;BR /&gt;SshFileCopy/SSHFILECOPY.C:1019: Connection to local, ready to serve requests.&lt;BR /&gt;Sftp2/SFTP2.C:728: Connection ready.&lt;BR /&gt;SshReadLine/SSHREADLINE.C:3652: Initializing ReadLine...&lt;BR /&gt;&lt;BR /&gt;So, first question, am I running some old stuff that doesn't work so well, and I need to get the latest TCPIP software?&lt;BR /&gt;&lt;BR /&gt;Then the second issue.  When I attempt to use the exact same files from a user account that has it's default directory on a disk other than the system disk, I can not perform an online SFTP, and of course not a batch job SFTP either.&lt;BR /&gt;&lt;BR /&gt;$ SFTP "-B" C.BAT fsrbi@209.172.179.22&lt;BR /&gt;%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000000000&lt;BR /&gt;0000, PC=00000000000EA240, PS=0000001B&lt;BR /&gt; &lt;BR /&gt;  Improperly handled condition, image exit forced.&lt;BR /&gt;    Signal arguments:   Number = 0000000000000005&lt;BR /&gt;                        Name   = 000000000000000C&lt;BR /&gt;                                 0000000000000000&lt;BR /&gt;                                 0000000000000000&lt;BR /&gt;                                 00000000000EA240&lt;BR /&gt;                                 000000000000001B&lt;BR /&gt; &lt;BR /&gt;    Register dump:&lt;BR /&gt;    R0  = 0000000000000000  R1  = 0000000000000014  R2  = 0000000000015E80&lt;BR /&gt;    R3  = 0000000000000000  R4  = 0000000000874750  R5  = 000000000005AA40&lt;BR /&gt;    R6  = 0000000000000001  R7  = 000000000005AA40  R8  = 0000000000000001&lt;BR /&gt;    R9  = 0000000000000000  R10 = 0000000000000001  R11 = 0000000000000000&lt;BR /&gt;    R12 = 0000000000000001  R13 = 0000000000507840  R14 = 0000000000877B80&lt;BR /&gt;    R15 = 0000000000877D28  R16 = 0000000000000000  R17 = 00000000000615E0&lt;BR /&gt;    R18 = 0000000000060C70  R19 = 0000000000000CF4  R20 = 0000000000015C78&lt;BR /&gt;    R21 = 0000000000000000  R22 = 0000000000877E6A  R23 = 0000000000000019&lt;BR /&gt;    R24 = 0000000000021999  R25 = 0000000000000001  R26 = 00000000000FD918&lt;BR /&gt;    R27 = 0000000000013EA0  R28 = 0000000000000000  R29 = 000000007AE56D50&lt;BR /&gt;Warning: child process (/sys$system/tcpip$ssh_ssh2) exited with code -10.B&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;%TCPIP-E-SSH_FC_ERROR, error in ssh file transfer operation&lt;BR /&gt;&lt;BR /&gt;I've got no idea what is causing the access violation.  I'm really hoping that SFTP can be used from a user account with it's default directory not on the system disk.&lt;BR /&gt;</description>
    <pubDate>Mon, 25 Apr 2011 22:43:44 GMT</pubDate>
    <dc:creator>David Froble</dc:creator>
    <dc:date>2011-04-25T22:43:44Z</dc:date>
    <item>
      <title>Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777756#M60643</link>
      <description>I'm trying to use SFTP in a batch command file.&lt;BR /&gt;&lt;BR /&gt;$ SFTP "-D 99" -o "batchmode no" fsrbi@209.172.179.22&lt;BR /&gt;fayave8A&lt;BR /&gt;ls /TEST/TO/CURRENT&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;Looks simple enough to me.  Doesn't work.  So I set the SFTP debug mode to 99, and got lots of diagnostics.  It appears that even though I specified the batchmode to be "no", and I had also tried it as "yes", SSH is determining that it is a batch mode, and is therefore surpressing the password prompt.&lt;BR /&gt;&lt;BR /&gt;Short excerpt from the log file:&lt;BR /&gt;&lt;BR /&gt;debug: server offers auth methods 'gssapi-with-mic,password,publickey,keyboard-i&lt;BR /&gt;nteractive'.&lt;BR /&gt; &lt;BR /&gt;debug: Ssh2AuthPasswdClient/AUTHC-PASSWD.C:261: In Batchmode, so we're not askin&lt;BR /&gt;g the user for password.&lt;BR /&gt; &lt;BR /&gt;debug: Ssh2AuthClient/SSHAUTHC.C:385: Method 'password' disabled.&lt;BR /&gt; &lt;BR /&gt;debug: server offers auth methods 'gssapi-with-mic,password,publickey,keyboard-i&lt;BR /&gt;nteractive'.&lt;BR /&gt; &lt;BR /&gt;debug: Ssh2Common/SSHCOMMON.C:185: DISCONNECT received: No further authenticatio&lt;BR /&gt;n methods available.&lt;BR /&gt;</description>
      <pubDate>Thu, 14 Apr 2011 20:28:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777756#M60643</guid>
      <dc:creator>David Froble</dc:creator>
      <dc:date>2011-04-14T20:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777757#M60644</link>
      <description>You will usually want to have batch-mode enabled (via the "-B" switch), and to set up the matching public certificate on the target box.&lt;BR /&gt;&lt;BR /&gt;The sftp and scp commands aren't (per my experience and per the documentation for at least some of the TCP/IP Services releases) particularly stable around trying to embed a password, if they even permit the password at all.  (I know TCP/IP Services V5.5 was pretty wonky here, though there might be (is?) a patch for that.) &lt;BR /&gt;&lt;BR /&gt;The certificate path works rather better here, in general.&lt;BR /&gt;&lt;BR /&gt;Using a straight scp command (with a public key on the far end) might be easier than having that sequence of input, too; you can likely specify the target file path in a quoted string.  With the certificates, that likely removes the need for that sequence of embedded commands, too.</description>
      <pubDate>Thu, 14 Apr 2011 21:02:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777757#M60644</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2011-04-14T21:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777758#M60645</link>
      <description>&lt;!--!*#--&gt;&amp;gt; fayave8A&lt;BR /&gt;&lt;BR /&gt;That's supposed to be the password?&lt;BR /&gt;&lt;BR /&gt;In general, SSH, SCP, SFTP, and friends were&lt;BR /&gt;designed not to encourage users to store&lt;BR /&gt;passwords in files.  (And you can probably&lt;BR /&gt;replace "encourage" with "permit".  "S"&lt;BR /&gt;stands for "Secure", not "Sloppy".)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] SSH is determining that it is a batch&lt;BR /&gt;&amp;gt; mode, [...]&lt;BR /&gt;&lt;BR /&gt;More generally, that it has no controlling&lt;BR /&gt;terminal, therefore no (real) user&lt;BR /&gt;interaction is possible.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...],keyboard-interactive'.&lt;BR /&gt;&lt;BR /&gt;They don't call it "keyboard-interactive" for&lt;BR /&gt;no reason.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; The certificate path works rather better&lt;BR /&gt;&amp;gt; here, in general.&lt;BR /&gt;&lt;BR /&gt;Well, public keys, but yes.  If you could get&lt;BR /&gt;this to work as you apparently wish to, then&lt;BR /&gt;I'd expect someone to fix it eventually, so&lt;BR /&gt;that it wouldn't work.</description>
      <pubDate>Thu, 14 Apr 2011 21:21:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777758#M60645</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-04-14T21:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777759#M60646</link>
      <description>The two above answers are spot on - SFTP won't do password or keyboard-interactive authentication when running as a batch job. It doesn't matter whether or not you tell it to use batch mode as it will figure out that it doesn't have a controlling terminal.&lt;BR /&gt;&lt;BR /&gt;So, you'll have to set up for public key or host based authentication. See &lt;A href="http://h71000.www7.hp.com/doc/83final/ba548_90007/ch03s08.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/83final/ba548_90007/ch03s08.html&lt;/A&gt; or &lt;A href="http://h71000.www7.hp.com/doc/83final/ba548_90007/ch03s07.html" target="_blank"&gt;http://h71000.www7.hp.com/doc/83final/ba548_90007/ch03s07.html&lt;/A&gt;&lt;BR /&gt;I recommend public key. Do NOT use a pass-phrase when creating your public key - this is the same as supplying a password and won't help for batch mode. (Though I have heard of some users being able to do strange things with pipes, I've always told them "don't tell me if it breaks because I won't try to fix it".)&lt;BR /&gt;&lt;BR /&gt;When you put your public key on the remote system you need to know the specifics of how the implementation of SSH on that system uses to find the public key and what format it is in. The directions for TCP/IP Services work for TCP/IP Services (and MultiNet and TCPware), but won't work for OpenSSH based implementations, which are quite common. Also TCP/IP Services generates keys that follow the RFC and OpenSSH wants a different format. The SSHKEYGEN program on OpenSSH systems can convert between the two formats.</description>
      <pubDate>Fri, 15 Apr 2011 11:38:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777759#M60646</guid>
      <dc:creator>Richard Whalen</dc:creator>
      <dc:date>2011-04-15T11:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777760#M60647</link>
      <description>&lt;!--!*#--&gt;&amp;gt; When you put your public key on the remote&lt;BR /&gt;&amp;gt; system you need to know [...]&lt;BR /&gt;&lt;BR /&gt;A Forum search for keywords like, say,&lt;BR /&gt;      ssh key format&lt;BR /&gt;should find some relevant old threads.  If&lt;BR /&gt;you do need help, then actual info about the&lt;BR /&gt;systems involved (TCPIP SHOW VERSION,&lt;BR /&gt;'SSH "-V"', "uname -a", "ssh -V", ...) might&lt;BR /&gt;be useful.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] The SSHKEYGEN program on OpenSSH&lt;BR /&gt;&amp;gt; systems [...]&lt;BR /&gt;&lt;BR /&gt;Normally known as "ssh-keygen".  "man&lt;BR /&gt;ssh-keygen" often works on UNIX(-like)&lt;BR /&gt;systems.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; fayave8A&lt;BR /&gt;&lt;BR /&gt;Don't forget to change this password, if that&lt;BR /&gt;was an actual password.  (We also have a user&lt;BR /&gt;name and an IP address.)</description>
      <pubDate>Fri, 15 Apr 2011 12:40:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777760#M60647</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-04-15T12:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777761#M60648</link>
      <description>Yes, that's the IP, user, and password.  Just testing, and password will be changed, so I didn't mind posting it if it would help anyone get the procedure working.  If anybody wants to hack some lawn mower parts, be my guest.&lt;BR /&gt;&lt;BR /&gt;What I'm reading is that what I need to do just won't work.  The trading partner isn't playing with a full deck, and apparently doesn't care if my customer has to manually perform the transfers every day.  That just isn't acceptable.&lt;BR /&gt;&lt;BR /&gt;It appears that there will not be any cooperation with the trading partner as far as setting up certificates.  Already tried that, but I guess I can grovel some more.  Don't think it will help.&lt;BR /&gt;&lt;BR /&gt;So, let me reframe my inquiry.  Got a trading partner, wants to use SFTP, will not do more than issue IP, user, and password.  Any ideas on how to automate the transfer of some files?&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Apr 2011 16:12:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777761#M60648</guid>
      <dc:creator>David Froble</dc:creator>
      <dc:date>2011-04-15T16:12:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777762#M60649</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] What I'm reading is that what I need&lt;BR /&gt;&amp;gt; to do just won't work. [...]&lt;BR /&gt;&lt;BR /&gt;It certainly won't be as easy as one might&lt;BR /&gt;hope.  It might be possible to use Kermit&lt;BR /&gt;scripting to fake an interactive (-looking)&lt;BR /&gt;session with the SFTP client&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Any ideas on how to automate the transfer&lt;BR /&gt;&amp;gt; of some files?&lt;BR /&gt;&lt;BR /&gt;It's not entirely clear to me which client&lt;BR /&gt;needs to talk to whose server, and I've never&lt;BR /&gt;tried this, but if you can puzzle out the&lt;BR /&gt;style of the server's SSH software, then it&lt;BR /&gt;might be possible to construct your own key&lt;BR /&gt;files, and then use SFTP manually, once, to&lt;BR /&gt;install your public key file (and any other&lt;BR /&gt;related stuff) on that server.  You'd need to&lt;BR /&gt;get the file ownership (easy?) and&lt;BR /&gt;permissions (perhaps less easy) right on the&lt;BR /&gt;server, and you would need write access to&lt;BR /&gt;your home directory there.  It's all easier&lt;BR /&gt;if the server owner cooperates, or if you&lt;BR /&gt;have full SSH access instead of only SFTP,&lt;BR /&gt;but, if you use public keys, then you really&lt;BR /&gt;do want to generate your own key files, so&lt;BR /&gt;that your private key remains your private&lt;BR /&gt;key.</description>
      <pubDate>Fri, 15 Apr 2011 18:01:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777762#M60649</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-04-15T18:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777763#M60650</link>
      <description>If they're connecting into your servers, then they'll have to ship you a public key, because that's just the way sftp and scp works here.&lt;BR /&gt;&lt;BR /&gt;If they're not technically inclined, then generate and give them a private key and tell them that it's their secret password (and it is), and tell them where to locate it in their file structure (you'll need to know the type of system and the ssh/sftp/scp tool), and drop the matching public key onto your own server.  (I'd probably then delete the private key from the local servers, but that's your call.)&lt;BR /&gt;&lt;BR /&gt;If you're connecting into them, then drop your own public key into the login directory and add the reference into whatever passes for AUTHORIZATION on the remote box, and Bob's your uncle.&lt;BR /&gt;</description>
      <pubDate>Fri, 15 Apr 2011 18:01:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777763#M60650</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2011-04-15T18:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777764#M60651</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] If anybody wants to hack some lawn&lt;BR /&gt;&amp;gt; mower parts, be my guest. [...]&lt;BR /&gt;&lt;BR /&gt;You could be in luck.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] Remote version: SSH-2.0-5.3.6.18 SSH Tectia Server&lt;BR /&gt;&lt;BR /&gt;Interestingly, the Tectia SSH software seems&lt;BR /&gt;to use the same SSH2-style key file format as&lt;BR /&gt;the TCPIP SSH software.  Better yet, Tectia&lt;BR /&gt;seems still to offer HTML documentation for&lt;BR /&gt;their products (unlike some vendors I could&lt;BR /&gt;name):&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.tectia.com/manuals/server-admin/53/index.html" target="_blank"&gt;http://www.tectia.com/manuals/server-admin/53/index.html&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://www.tectia.com/manuals/server-admin/53/userauth-pk-authfile.html" target="_blank"&gt;http://www.tectia.com/manuals/server-admin/53/userauth-pk-authfile.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;According to which, all one should need to do&lt;BR /&gt;is drop a suitable public key file into the&lt;BR /&gt;".ssh2" directory on the server.  Which I&lt;BR /&gt;did.  Then, any old (Stream_LF, ideally, but&lt;BR /&gt;fear not) SFTP batch file can be used without&lt;BR /&gt;user interaction.  For example:&lt;BR /&gt;&lt;BR /&gt;alp $ type ls-lR.bat&lt;BR /&gt;pwd&lt;BR /&gt;ls -lR&lt;BR /&gt;quit&lt;BR /&gt;&lt;BR /&gt;alp $ sftp "-B" ls-lR.bat fsrbi@209.172.179.22&lt;BR /&gt;sftp&amp;gt; pwd&lt;BR /&gt;/&lt;BR /&gt;sftp&amp;gt; ls -lR&lt;BR /&gt;.&lt;BR /&gt;TO&lt;BR /&gt;TO/ARCHIVE&lt;BR /&gt;TO/CURRENT&lt;BR /&gt;FROM&lt;BR /&gt;FROM/ARCHIVE&lt;BR /&gt;FROM/CURRENT&lt;BR /&gt;TEST&lt;BR /&gt;TEST/TO&lt;BR /&gt;TEST/TO/ARCHIVE&lt;BR /&gt;TEST/TO/ARCHIVE/NRB02081351084.TXT&lt;BR /&gt;TEST/TO/ARCHIVE/NRB02161537200.TXT&lt;BR /&gt;TEST/TO/ARCHIVE/NRB11231731097.TXT&lt;BR /&gt;TEST/TO/ARCHIVE/NRB02161314095.TXT&lt;BR /&gt;TEST/TO/CURRENT&lt;BR /&gt;TEST/FROM&lt;BR /&gt;TEST/FROM/ARCHIVE&lt;BR /&gt;TEST/FROM/CURRENT&lt;BR /&gt;.ssh2&lt;BR /&gt;.ssh2/authorized_keys&lt;BR /&gt;.ssh2/authorized_keys/sms_npp_id_dsa_1024_a.pub&lt;BR /&gt;RBI.TXT&lt;BR /&gt;sftp&amp;gt; quit&lt;BR /&gt;&lt;BR /&gt;alp $&lt;BR /&gt;&lt;BR /&gt;(Look!  It's Uncle Bob!)&lt;BR /&gt;&lt;BR /&gt;Feel free to delete my public key file&lt;BR /&gt;whenever it's convenient.  (What do I care?&lt;BR /&gt;It's a _public_ key file.)&lt;BR /&gt;&lt;BR /&gt;Fine print:&lt;BR /&gt;&lt;BR /&gt;You do need to generate a key pair, if you&lt;BR /&gt;don't already have one lying around.&lt;BR /&gt;&lt;BR /&gt;I didn't actually try this in a&lt;BR /&gt;non-interactive mode, but if no one asks for&lt;BR /&gt;or expects a password, then what could go&lt;BR /&gt;wrong?</description>
      <pubDate>Fri, 15 Apr 2011 23:32:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777764#M60651</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-04-15T23:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777765#M60652</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] what could go wrong?&lt;BR /&gt;&lt;BR /&gt;Apparently nothing.  (Nothing obvious,&lt;BR /&gt;anyway.)  It worked in a batch job, too, as&lt;BR /&gt;expected.&lt;BR /&gt;&lt;BR /&gt;alp $ type ls-lR_bat.com&lt;BR /&gt;$ proc_dev_dir = f$parse( "A.;", f$environment( "procedure"))- "A.;"&lt;BR /&gt;$ set default 'proc_dev_dir'&lt;BR /&gt;$ sftp "-B" ls-lR.bat fsrbi@209.172.179.22&lt;BR /&gt;&lt;BR /&gt;alp $ sub ls-lR_bat.com /log = ALP$DKC0:[SMS.ITRC.froble]ls-lR_bat.log&lt;BR /&gt;Job ls-lR_bat (queue SYS$BATCH_ALP, entry 763) started on SYS$BATCH_ALP&lt;BR /&gt;&lt;BR /&gt;Job ls-lR_bat (queue SYS$BATCH_ALP, entry 763) completed&lt;BR /&gt;&lt;BR /&gt;alp $ type ls-lR_bat.log&lt;BR /&gt;$ Set NoOn&lt;BR /&gt;$ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY"))&lt;BR /&gt;sftp&amp;gt; pwd&lt;BR /&gt;/&lt;BR /&gt;sftp&amp;gt; ls -lR&lt;BR /&gt;.&lt;BR /&gt;TO&lt;BR /&gt;TO/ARCHIVE&lt;BR /&gt;TO/CURRENT&lt;BR /&gt;FROM&lt;BR /&gt;FROM/ARCHIVE&lt;BR /&gt;FROM/CURRENT&lt;BR /&gt;TEST&lt;BR /&gt;TEST/TO&lt;BR /&gt;TEST/TO/ARCHIVE&lt;BR /&gt;TEST/TO/ARCHIVE/NRB02081351084.TXT&lt;BR /&gt;TEST/TO/ARCHIVE/NRB02161537200.TXT&lt;BR /&gt;TEST/TO/ARCHIVE/NRB11231731097.TXT&lt;BR /&gt;TEST/TO/ARCHIVE/NRB02161314095.TXT&lt;BR /&gt;TEST/TO/CURRENT&lt;BR /&gt;TEST/FROM&lt;BR /&gt;TEST/FROM/ARCHIVE&lt;BR /&gt;TEST/FROM/CURRENT&lt;BR /&gt;.ssh2&lt;BR /&gt;.ssh2/authorized_keys&lt;BR /&gt;.ssh2/authorized_keys/sms_npp_id_dsa_1024_a.pub&lt;BR /&gt;RBI.TXT&lt;BR /&gt;sftp&amp;gt; quit&lt;BR /&gt;  SMS          job terminated at 15-APR-2011 22:19:38.36&lt;BR /&gt;&lt;BR /&gt;  Accounting information:&lt;BR /&gt;  Buffered I/O count:               1186      Peak working set size:      11760&lt;BR /&gt;  Direct I/O count:                  110      Peak virtual size:         186560&lt;BR /&gt;  Page faults:                       930      Mounted volumes:                0&lt;BR /&gt;  Charged CPU time:        0 00:00:00.22      Elapsed time:       0 00:00:10.75&lt;BR /&gt;alp $&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(The batch log file suffers from extra CR&lt;BR /&gt;characters on line endings of the directory&lt;BR /&gt;listing sent from the server, but I've seen&lt;BR /&gt;worse pollution.)</description>
      <pubDate>Sat, 16 Apr 2011 02:37:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777765#M60652</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-04-16T02:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777766#M60653</link>
      <description>Some specifics:&lt;BR /&gt;&lt;BR /&gt;My VMS system is the client, and I do not know the OS and such of the server.&lt;BR /&gt;&lt;BR /&gt;I've produced private and public keys, and moved a copy of the public key to the remote server, using the directories Steven had already created in his testing.&lt;BR /&gt;&lt;BR /&gt;I can now perform a SFTP connection without using password, and I can perform a SFTP connection using a batch file.&lt;BR /&gt;&lt;BR /&gt;MANY THANKS TO STEVEN SCHWEDA FOR THE HELP AND EXAMPLES.&lt;BR /&gt;&lt;BR /&gt;Working from my own user account, with it's default directory on the system disk, I get the following when executing the command file in a batch job.&lt;BR /&gt;&lt;BR /&gt;-----------&lt;BR /&gt;C.COM&lt;BR /&gt;$ set verify&lt;BR /&gt;$&lt;BR /&gt;$ SFTP "-B" C.BAT fsrbi@209.172.179.22&lt;BR /&gt;------------&lt;BR /&gt;C.BAT&lt;BR /&gt;pwd&lt;BR /&gt;ls&lt;BR /&gt;ls "-R"&lt;BR /&gt;quit&lt;BR /&gt;------------&lt;BR /&gt;C.LOG&lt;BR /&gt;$ Set NoOn&lt;BR /&gt;$&lt;BR /&gt;$ VERIFY = F$VERIFY(F$TRNLNM("SYLOGIN_VERIFY"))&lt;BR /&gt;Performing SYS$MANAGER:SYLOGIN.COM ...&lt;BR /&gt;Performing [DFE]LOGIN.COM ....&lt;BR /&gt;$&lt;BR /&gt;$ SFTP "-B" C.BAT fsrbi@209.172.179.22&lt;BR /&gt;sftp&amp;gt; pwd&lt;BR /&gt;/&lt;BR /&gt;sftp&amp;gt; ls&lt;BR /&gt;Warning: Failed to set terminal mode to PASTHRU in sftp.&lt;BR /&gt;sftp&amp;gt; ls "-R"&lt;BR /&gt;Warning: Failed to set terminal mode to PASTHRU in sftp.&lt;BR /&gt;sftp&amp;gt; quit&lt;BR /&gt;  DFE          job terminated at 25-APR-2011 19:31:58.73&lt;BR /&gt;-----------&lt;BR /&gt;&lt;BR /&gt;What I'm using:&lt;BR /&gt;&lt;BR /&gt;BRYCE&amp;gt; tcpip show version&lt;BR /&gt; &lt;BR /&gt;  HP TCP/IP Services for OpenVMS Alpha Version V5.6&lt;BR /&gt;  on an AlphaStation 200 4/233 running OpenVMS V8.3&lt;BR /&gt; &lt;BR /&gt;BRYCE&amp;gt; sftp -v&lt;BR /&gt;Sftp2/SFTP2.C:4543: CRTL version (SYS$SHARE:DECC$SHARE ident) is: V8.3-00&lt;BR /&gt; &lt;BR /&gt;SshFileCopy/SSHFILECOPY.C:1080: Making local connection.&lt;BR /&gt;Ssh2SftpServer/SSHFILEXFERS.C:1754: Received SSH_FXP_INIT&lt;BR /&gt;Ssh2SftpServer/SSHFILEXFERS.C:1799: version is 3&lt;BR /&gt;SshFileCopy/SSHFILECOPY.C:1019: Connection to local, ready to serve requests.&lt;BR /&gt;Sftp2/SFTP2.C:728: Connection ready.&lt;BR /&gt;SshReadLine/SSHREADLINE.C:3652: Initializing ReadLine...&lt;BR /&gt;&lt;BR /&gt;So, first question, am I running some old stuff that doesn't work so well, and I need to get the latest TCPIP software?&lt;BR /&gt;&lt;BR /&gt;Then the second issue.  When I attempt to use the exact same files from a user account that has it's default directory on a disk other than the system disk, I can not perform an online SFTP, and of course not a batch job SFTP either.&lt;BR /&gt;&lt;BR /&gt;$ SFTP "-B" C.BAT fsrbi@209.172.179.22&lt;BR /&gt;%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual address=000000000000&lt;BR /&gt;0000, PC=00000000000EA240, PS=0000001B&lt;BR /&gt; &lt;BR /&gt;  Improperly handled condition, image exit forced.&lt;BR /&gt;    Signal arguments:   Number = 0000000000000005&lt;BR /&gt;                        Name   = 000000000000000C&lt;BR /&gt;                                 0000000000000000&lt;BR /&gt;                                 0000000000000000&lt;BR /&gt;                                 00000000000EA240&lt;BR /&gt;                                 000000000000001B&lt;BR /&gt; &lt;BR /&gt;    Register dump:&lt;BR /&gt;    R0  = 0000000000000000  R1  = 0000000000000014  R2  = 0000000000015E80&lt;BR /&gt;    R3  = 0000000000000000  R4  = 0000000000874750  R5  = 000000000005AA40&lt;BR /&gt;    R6  = 0000000000000001  R7  = 000000000005AA40  R8  = 0000000000000001&lt;BR /&gt;    R9  = 0000000000000000  R10 = 0000000000000001  R11 = 0000000000000000&lt;BR /&gt;    R12 = 0000000000000001  R13 = 0000000000507840  R14 = 0000000000877B80&lt;BR /&gt;    R15 = 0000000000877D28  R16 = 0000000000000000  R17 = 00000000000615E0&lt;BR /&gt;    R18 = 0000000000060C70  R19 = 0000000000000CF4  R20 = 0000000000015C78&lt;BR /&gt;    R21 = 0000000000000000  R22 = 0000000000877E6A  R23 = 0000000000000019&lt;BR /&gt;    R24 = 0000000000021999  R25 = 0000000000000001  R26 = 00000000000FD918&lt;BR /&gt;    R27 = 0000000000013EA0  R28 = 0000000000000000  R29 = 000000007AE56D50&lt;BR /&gt;Warning: child process (/sys$system/tcpip$ssh_ssh2) exited with code -10.B&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt;%TCPIP-E-SSH_FC_ERROR, error in ssh file transfer operation&lt;BR /&gt;&lt;BR /&gt;I've got no idea what is causing the access violation.  I'm really hoping that SFTP can be used from a user account with it's default directory not on the system disk.&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Apr 2011 22:43:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777766#M60653</guid>
      <dc:creator>David Froble</dc:creator>
      <dc:date>2011-04-25T22:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Using SFTP in a batch job</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777767#M60654</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] I do not know the OS and such of the&lt;BR /&gt;&amp;gt; server.&lt;BR /&gt;&lt;BR /&gt;It's in the "-v" diagnostic messages.  (I&lt;BR /&gt;didn't make that stuff up.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] the directories Steven had already&lt;BR /&gt;&amp;gt; created in his testing.&lt;BR /&gt;&lt;BR /&gt;The directories were already there.  All I&lt;BR /&gt;added was the public key file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] the command file in a batch job.&lt;BR /&gt;&lt;BR /&gt;But the SFTP batch file worked well enough&lt;BR /&gt;interactively?  (It's a start.)  As you can&lt;BR /&gt;see, I had no trouble both ways.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; BRYCE&amp;gt; tcpip show version&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; HP TCP/IP Services for OpenVMS Alpha Version V5.6&lt;BR /&gt;&amp;gt; on an AlphaStation 200 4/233 running OpenVMS V8.3&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] am I running some old stuff&lt;BR /&gt;&lt;BR /&gt;Yes.  (Hardware, too, it seems.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  that doesn't work so well, and I need to&lt;BR /&gt;&amp;gt; get the latest TCPIP software?&lt;BR /&gt;&lt;BR /&gt;Probably.  (Have you ever seen a bug-free&lt;BR /&gt;TCPIP kit?)  Around here, for example:&lt;BR /&gt;&lt;BR /&gt;ALP $ tcpip show version&lt;BR /&gt;&lt;BR /&gt;  HP TCP/IP Services for OpenVMS Alpha Version V5.6 - ECO 5&lt;BR /&gt;  on a COMPAQ Professional Workstation XP1000 running OpenVMS V8.3&lt;BR /&gt;&lt;BR /&gt;&amp;gt; BRYCE&amp;gt; sftp -v&lt;BR /&gt;&amp;gt; [...]&lt;BR /&gt;&lt;BR /&gt;I did suggest 'SSH "-V"', didn't I?&lt;BR /&gt;&lt;BR /&gt;ALP $ ssh "-V"&lt;BR /&gt;alp$dkc0:[sys0.syscommon.][sysexe]tcpip$ssh_ssh2.exe: SSH Secure Shell OpenVMS (&lt;BR /&gt;V5.5) 3.2.0 on COMPAQ Professional Workstation  - VMS V8.3&lt;BR /&gt;&lt;BR /&gt;With hobbyist patch access having been&lt;BR /&gt;extinguished, I can't say what's current, but&lt;BR /&gt;five (or more) ECOs behind is generally not a&lt;BR /&gt;happy place to be.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; I've got no idea what is causing the access&lt;BR /&gt;&amp;gt; violation.&lt;BR /&gt;&lt;BR /&gt;Usually, it's bad software, and yours is old&lt;BR /&gt;(so probably bad).&lt;BR /&gt;&lt;BR /&gt;&amp;gt; [...] I'm really hoping that SFTP can be&lt;BR /&gt;&amp;gt; used from a user account with it's default&lt;BR /&gt;&amp;gt; directory not on the system disk.&lt;BR /&gt;&lt;BR /&gt;My examples showing the prompt "alp $ " were&lt;BR /&gt;run from my personal account.  (My SYS$LOGIN&lt;BR /&gt;is on the system disk, but  wouldn't expect&lt;BR /&gt;that to matter.)&lt;BR /&gt;&lt;BR /&gt;And that's "its default directory".</description>
      <pubDate>Tue, 26 Apr 2011 01:04:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/using-sftp-in-a-batch-job/m-p/4777767#M60654</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2011-04-26T01:04:17Z</dc:date>
    </item>
  </channel>
</rss>

