NonStop SSH SFTP API Reference Manual

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. You may also pre-configure a password for the login to the target server (refer to the
SSH reference manual for details), in which case the password parameter in the FTPopen[_nw] call will be ignored.
SFTP can also facilitate the "publickey" authentication method, if a) the user id under which the application is running
has a key which is configured in the SSH key store, and b) the key is accepted for authentication on the remote system. If
public key authentication is sufficient for logging in to the remote SSH daemon, then again the password parameter will
be ignored by SFTP
As SFTP does not support accounts with login, the account parameter will be ignored.
Host Authentication
Unlike FTP, remote SSH hosts are authenticated by the SFTP client using the host's public host during SSH session
establishment. Depending on the value of the SSH2 STRICTHOSTKEYCHECKING option, the SFTP client may
prompt the user to accept an unknown host key. This cannot be accomplished programmatically over the API. Therefore,
it is required to pre-configure the public key of the target SSH hosts as KNOWNHOST for the application user id (for
details of the SSHCOM ADD KNOWNHOSTS command, please refer to the SSH2 reference manual)
Log Files
Like FTP, SFTP is capable of logging its activity into a log file specified in the FTPopen[nw] command. Due to the
different nature of the SFTP protocol, the content of the log file will be different.
The log file is very useful for troubleshooting migration problems, as it will show any connection problems, command
errors or calls to unsupported API functions.
ASCII mode transfers
Like FTP, SFTP supports ascii mode file transfers. However, the SFTP protocol versions in use by most SFTP servers do
not support transparent negotiation of the newline convention used for ASCII files. To overcome this limitation, SFTP
will accept the following type characters passed by the FTPsettype call, and map it to an equivalent SFTP command:
Type character Equivalent SFTP command
'I' binary
'A' ascii
'U' ascii unix
'D' ascii dos
'M' ascii mac
Reply Texts
The FTP API allows to obtain FTP reply texts using the FTPreplytext[_nw] routine. While the routine is supported by
SFTP, the returned information will be different from FTP. In most cases, it will be empty. In case of an error, it usually
contains the error message as it would be displayed by the SFTP client in interactive mode.
If your application checks the reply text for specific patterns, you may need to change your code when migrating to
SFTP.
HP NonStop SFTP API Reference Manual . Migrating FTP API Applications to SFTP API 11