IBM Support

Redirecting Secure FTP (SFTP) Verbose Output to a File

Troubleshooting


Problem

This document describes how to redirect SFTP, SSH, or SCP verbose output to a file.

Resolving The Problem

This document describes how to redirect SFTP, SSH, or SCP verbose output to a file, and some clients may have a need to do this. The verbose output in the file can be analyzed to debug a problem or it can be parsed by a program. The sequence of steps that can be used to redirect SFTP verbose output to a file are as follows:

o

Create the IFS directory where the verbose output file will reside:

MKDIR DIR('/SFTP_Logs')
oCreate the text file that the verbose output will be redirected to:

QSH CMD('/QOpenSys/usr/bin/touch /SFTP_Logs/verbose.txt')
oUse the -vvv option to redirect the SFTP output to the verbose.txt file:

sftp -vvv someuser@somehost > /SFTP_Logs/verbose.txt 2>&1
Note: The standard error (2) and standard output (1) file descriptions were used to redirect the SFTP verbose output to a file. Verbose output for the SSH and SCP utilities can also be redirected to a file. The redirection of verbose output to a file can occur interactively within the PASE or QSHELL environments. The redirection of verbose output can also be done through a batch process.

[{"Product":{"code":"SWG60","label":"IBM i"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Communications-TCP","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Historical Number

599741764

Document Information

Modified date:
18 December 2019

UID

nas8N1011526