<?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 on VMS in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363290#M16229</link>
    <description>SFTP and SCP both need to be able to spawn a subprocess in order to operate.  The subprocess is used to run SSH, which does the authentication and encryption.  SFTP/SCP then pass SFTP protocol commands across the secure connection created by SSH to a process on the remote system that is running the SFTP server.  (Yes, the server needs to be able to create a subprocess as well.)</description>
    <pubDate>Mon, 23 Feb 2009 22:30:11 GMT</pubDate>
    <dc:creator>Richard Whalen</dc:creator>
    <dc:date>2009-02-23T22:30:11Z</dc:date>
    <item>
      <title>SFTP on VMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363285#M16224</link>
      <description>I’m trying to use SFTP with “-B” option in a command procedure to transfer files in &amp;amp; out of an OpenVMS (V7.3-2) machine. The TCPIP service is V5.4 – ECO7. This procedure gets SFTP inputs and will be used in batch or interactively by our clients with captive accounts.&lt;BR /&gt;&lt;BR /&gt;I would appreciate if someone can help me to resolve the following issues:&lt;BR /&gt;&lt;BR /&gt;1- I would like to hide SFTP outputs from user. It seems re-direction of output does not work properly with SFTP and because of captive accounts unfortunately I cannot use PIPE command as John Gillings suggested in this thread.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1235149942672+28353475&amp;amp;threadId=1185836" target="_blank"&gt;http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1235149942672+28353475&amp;amp;threadId=1185836&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;2- After invoking SFTP I need to know the execution status in order to branch my procedure properly. Unfortunately SFTP terminate my procedure abnormally if it fails to connect or because of any other reason (i.e. incorrect input …). SFTP sets $STATUS properly when it is completed successfully.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Many thanks in advance,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Feb 2009 17:54:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363285#M16224</guid>
      <dc:creator>Hadi Bahreini</dc:creator>
      <dc:date>2009-02-20T17:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP on VMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363286#M16225</link>
      <description>Welcome to the ITRC forums.&lt;BR /&gt;&lt;BR /&gt;Some elaboration on why you can't use PIPE or why there are problems with sftp errors could be useful here; error messages, example DCL, or some other related details can go a long way toward a resolution.  I'll take a few guesses in what follows, which can hopefully get you back on course with something close to one of the proposed solutions.&lt;BR /&gt;&lt;BR /&gt;CAPTIVE means you've tried PIPE /TRUSTED, then?  Generic SPAWN operations don't work from the CAPTIVE environments, but /TRUSTED operations can sometimes be useful.  &lt;BR /&gt;&lt;BR /&gt;As for the procedure termination, I tend to use one file at a time, and I use SET NOON or ON whatsit in most every DCL procedure.&lt;BR /&gt;&lt;BR /&gt;I'd not tend to trust the return status values for these cases, but that's a general skepticism around the return status values from various tools.&lt;BR /&gt;&lt;BR /&gt;Have a look at reversing the whole process and have the CAPTIVE username send a carefully-crafted message over to a remote (and more trusted) process, and have that deal with the transfer.&lt;BR /&gt;&lt;BR /&gt;I'd like to see a COPY /SFTP added, being a massive fan of COPY /FTP myself.&lt;BR /&gt;</description>
      <pubDate>Fri, 20 Feb 2009 19:35:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363286#M16225</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-02-20T19:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP on VMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363287#M16226</link>
      <description>Thanks a lot Hoff for your quick response. I had tried PIPE/TRUSTED in my COM file before and since I was getting "SPAWN not allowed" message I had this wrong impression that the error is caused by PIPE sub-process. Using your guide I tried SFTP directly and I got the same error. It seems sub-process is created by SFTP itself, VMS accounting also shows that. Does this mean SFTP and Captive accounts are incompatible?&lt;BR /&gt;&lt;BR /&gt;It seems I have a bigger problem now and have to correct my question to: How I can initiate a secure file transfer from a VMS captive account to the outside world?&lt;BR /&gt;&lt;BR /&gt;$sftp -v user@server&lt;BR /&gt;Sftp2/SFTP2.C:4804: CRTL version (SYS$SHARE:DECC$SHARE ident) is: V7.3-2-03&lt;BR /&gt;&lt;BR /&gt;SshFileCopy/SSHFILECOPY.C:1062: Making local connection.&lt;BR /&gt;Ssh2SftpServer/SSHFILEXFERS.C:2079: Received SSH_FXP_INIT&lt;BR /&gt;Ssh2SftpServer/SSHFILEXFERS.C:2124: version is 3&lt;BR /&gt;SshFileCopy/SSHFILECOPY.C:1001: Connection to local, ready to serve requests.&lt;BR /&gt;Sftp2/SFTP2.C:786: Connection ready.&lt;BR /&gt;SshReadLine/SSHREADLINE.C:3662: Initializing ReadLine...&lt;BR /&gt;SshFileCopy/SSHFILECOPY.C:1072: Connecting to remote host. (host = user@server, user = NULL, port = NULL)&lt;BR /&gt;argv[0] = /sys$system/tcpip$ssh_ssh2&lt;BR /&gt;argv[1] = -v&lt;BR /&gt;argv[2] = -x&lt;BR /&gt;argv[3] = -a&lt;BR /&gt;argv[4] = -o&lt;BR /&gt;argv[5] = passwordprompt %U@%H's password: &lt;BR /&gt;argv[6] = -o&lt;BR /&gt;argv[7] = authenticationnotify yes&lt;BR /&gt;argv[8] = user@server&lt;BR /&gt;argv[9] = -s&lt;BR /&gt;argv[10] = sftp&lt;BR /&gt;Executing ssh2 failed. Command:' /sys$system/tcpip$ssh_ssh2 -v -x -a -o passwordprompt %U@%H's password:  -o authenticationnotify yes user@server -s sftp' System error message: 'captive account - spawn command not allowed'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Feb 2009 20:35:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363287#M16226</guid>
      <dc:creator>Hadi Bahreini</dc:creator>
      <dc:date>2009-02-23T20:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP on VMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363288#M16227</link>
      <description>Whomever ported sftp omitted the use of the trusted flag; if sftp does need the spawn to operate (and it looks like it), then the port is incompatible with CAPTIVE.  (They probably used a system() call.)&lt;BR /&gt;&lt;BR /&gt;You'll probably find it easiest to work around this by passing the filename or such to a (trusted) server process (local or remote) and have that perform the operation.&lt;BR /&gt;&lt;BR /&gt;I don't know if the sftp source code is around.&lt;BR /&gt;&lt;BR /&gt;If you have a support contract, go log a trouble report with HP; this particular package could handle its security better.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Feb 2009 20:54:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363288#M16227</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-02-23T20:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP on VMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363289#M16228</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt; have you tried using scp to do this ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 23 Feb 2009 22:05:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363289#M16228</guid>
      <dc:creator>marsh_1</dc:creator>
      <dc:date>2009-02-23T22:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP on VMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363290#M16229</link>
      <description>SFTP and SCP both need to be able to spawn a subprocess in order to operate.  The subprocess is used to run SSH, which does the authentication and encryption.  SFTP/SCP then pass SFTP protocol commands across the secure connection created by SSH to a process on the remote system that is running the SFTP server.  (Yes, the server needs to be able to create a subprocess as well.)</description>
      <pubDate>Mon, 23 Feb 2009 22:30:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363290#M16229</guid>
      <dc:creator>Richard Whalen</dc:creator>
      <dc:date>2009-02-23T22:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: SFTP on VMS</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363291#M16230</link>
      <description>sftp and scp both use ssh.  Given the way that applications stacked on ssh typically operate, I'd expect anything that arrives on the host using ssh has the same basic issue with the trusted flag.&lt;BR /&gt;</description>
      <pubDate>Tue, 24 Feb 2009 04:03:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/sftp-on-vms/m-p/4363291#M16230</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2009-02-24T04:03:23Z</dc:date>
    </item>
  </channel>
</rss>

