SSH Reference Manual

Controlling SSH and SFTP Clients
on NonStop via an API
Customers who need to access SSH and SFTP clients programmatically can use additional API modules, which are
separately licensed:
The SFTPAPI module allows an FTPAPI application to establish an SFTP session instead of an FTP session.
Minor changes in the FTPAPI application code converts the application to an SFTPAPI application. This is
possible because the same header file ($SYSTEM.ZTCPIP.FTPEXTH) and library file
($SYSTEM.ZTCPIP.APILIB) is used as it is for FTPAPI.
The SSHAPI/SSHLIB module provides a general way to access and control an SSH client on NonStop™
providing a means for automating tasks on a remote system or, when using loopback, on the local system.
The following sections give a short overview. For more detailed information see the SFTP API Reference Manual and
the SSHLIB Reference Manual.
SFTPAPI
The SFTP API allows applications that previously used the FTP API to convert to SFTP in an easy manner. In many
cases, the conversion can be accomplished with only a few program changes. In the ideal case, programs do not need to
be changed or even re-compiled at all.
The following picture describes how applications transfer files with the FTP API:
When initiating an FTP session via the FTP APILIB, the library will start an FTP client process to handle the actual file
transfers for the application. APILIB will then communicate via inter-process messages with the FTP client process,
mapping the library calls to FTP commands to be processed by the FTP client.
The SFTP API solution works exactly the same way, as the following picture illustrates:
HP NonStop SSH Reference Manual Controlling SSH and SFTP Clients on NonStop via an API 239