IBM Support

Common SFTP batch mode message strings that begin with the word uploading or fetching are suppressed at OpenSSH level 6.3 & higher.

Troubleshooting


Problem

After upgrading to OpenSSH 6.3 or higher, the output from a batch sftp changes. After issuing a get or a put, previously there would have been ouput like "Uploading filename.ext..." or "Fetching filename.ext..." After 6.3, this output is no longer provided

Cause

OpenSSH 6.3 was changed to enforce "quiet" mode when doing batch mode transfer

Resolving The Problem

There is no way to turn off quiet mode when doing a batch mode transfer. It's kind of the point of batch mode that no-one has to see the output.

A workaround is to redirect the batch instructions to the sftp command, rather than specifying it with the '-b' option.

For example :


instead of

$ sftp -b test.sftp user@host 2>stderr.log
sftp
> progress
Progress meter enabled
sftp
> put testfrom/test1.txt testto/test1.txt
testfrom/test1.txt
100% 158 0.2KB/s 00:00

this works like they wanted:

sftp
user@host < test.sftp
sftp
> progress
Progress meter enabled
sftp
> put testfrom/test1.txt testto/test1.txt
Uploading testfrom/test1.txt to /home/user/testto/test1.txt
testfrom/test1.txt
100% 158 0.2KB/s 00:00

[{"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"}}]

Document Information

Modified date:
18 December 2019

UID

nas8N1021988