. HP NonStop SFTP API Reference Manual HP Part Number: 659755-003 Published: January 2014 Edition: HP NonStop SFTP API 1.4 G06.21 and subsequent G-series RVUs H06.07 and subsequent H-series RVUs J06.
© Copyright 2014 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor’s standard commercial license. The information contained herein is subject to change without notice.
Contents Preface 4 Who Should Read This Guide.................................................................................................................. 4 Related Reading ....................................................................................................................................... 4 Document History .................................................................................................................................... 4 Introduction 6 The Problem ............
Preface Who Should Read This Guide This manual is intended for application programmers and system administrators developing and maintaining applications which need to securely transfer files programmatically over the SFTP/SSH protocol. Related Reading SFTP API requires that one of the following products be installed and licensed on the system in order to work: HP NonStop SSH, comForte SecurFTP/SSH, or comForte SecurSH.
Version 1.1 • This is the first revised version of this documentation. Version 1.0 • This is the first version of this documentation. HP NonStop SFTP API Reference Manual .
Introduction The Problem A predominant option for securing file transfers with NonStop servers is to implement the SSH/SFTP protocol suite. As many sites used the FTP protocol for their file transfers before, this involves converting their transfer procedures from FTP to SFTP. This is usually very straight forward for interactive and batch transfers which can invoke the SFTP instead of FTP client program.
For transferring files via SFTP rather than FTP, the application still uses the same APILIB, which is part of the HP NonStop™ TCP/IP applications and utilities. However, APILIB is directed to start an SFTP rather than an FTP client. The SFTP client will support the same inter-process communication messages like FTP, mapping the programmatic commands it to the appropriate SFTP operations.
Installation System requirements To use the SFTP API, the following software must be installed on the NonStop server: • HP NonStop SSH, comForte SecurFTP/SSH, or comForte SecurSH. The SFTP client included with one of the packages above must have the following minimal version: • T9999H06_17Dec2009_comForte_SFTP_0088 • For NonStop SSH on J Series and H Series, SPRs T0801AAQ or later must be installed. • For NonStop SSH on G Series, SPRs T0801AAT or later must be installed.
Migrating FTP API Applications to SFTP API Overview The SFTP API has been designed to make migrating FTP API applications as easy as possible. Migration of an existing application will typically involve the following tasks: 1. Making your application invoke SFTP instead of FTP 2. Analyzing your application according to the aspects described under "Migration Considerations" below 3. Implementing any required application changes or SSH configuration uncovered by the analysis 4.
2. Replace the FTP program file that your code refers to with the SFTP program. This option is recommended only if your application code already refers to an FTP program file at a custom location. In this case you may replace the FTP program with the SFTP program. The commands would be somewhat as follows: > VOLUME $MYVOL.MYFTP > RENAME FTP, FTPOLD > FUP DUP $SYSTEM.SYS00.SFTP, FTP, SAVEALL This approach does not require recompiling your application, provided that no other code changes are needed.
If your application has coded a specific port number, you may need to adapt your code to switch to the appropriate port where an SSH daemon is listening on. User Authentication FTPopen[_nw] allows you to specify a user id, an account and a password for logging in to the remote server. The user id and password will be used for SSH authentication methods "password" and "keyboard-interactive" if accepted with the remote server.
Controlling Transfer Summary Summary information about each file transfer gets generated, e.g.: 165527760 bytes transferred in 86 seconds ( 1.8MB/s) By default the number of bytes transferred is set to the EOF value of a file. This ensures consistency between the size of a file displayed by the ls -l command and the summary information. But the size of the actual content of a Guardian edit or structured file can differ greatly from the EOF value.