Prior to 2013, sftp in batch mode (-b) produced output that included what was done. Quiet mode could be specified as well if desired. Batch mode now assumes quiet mode and cannot be overridden. This breaks integration which expects sftp output but uses batch mode. Quiet as the default might be ok, but there is no way to 'unquiet' I will be providing a pull on github that checks if quiet is set - if it's not set, assume quiet, if it's set to no, honour that setting. This provides the default functionality which is now current, but provides the ability to override.
I don't understand what you're referring to. sftp does produce output by default in batch mode: $ cat > /tmp/b cd /bin get ls /tmp get xxls /tmp $ sftp -b /tmp/b localhost sftp> cd /bin sftp> get ls /tmp sftp> get xxls /tmp File "/bin/xxls" not found.
It does have some output, but it's in quiet mode. https://github.com/openssh/openssh-portable/commit/9303e6527bb5ca7630c765f28624702c212bfd6c?fbclid=IwAR3KCDxObbHrEBsHNUrHDxFfv4FT6wULg2udwPq6ZhPZvHkbwYdA2qbwnYI#diff-bfa9ee6de996100a65619653d189809fR2195 shows where it sets quiet mode. example: $ ls -lrt total 0 $ cat /tmp/test/commands ls /tmp/test/ get /tmp/test/* $ sftp -b /tmp/test/commands testhost sftp> ls /tmp/test /tmp/test/1file /tmp/test/2dir /tmp/test/3file sftp> get /tmp/test/* Cannot download non-regular file: /tmp/test/2dir/ $ ls 1file 3file Compare to: matt@ludev:/tmp/dest$ sftp testhost < /tmp/test/commands Connected to testhost. sftp> ls /tmp/test/ /tmp/test/1file /tmp/test/2dir /tmp/test/3file sftp> get /tmp/test/* Fetching /tmp/test/1file to 1file Fetching /tmp/test/2dir/ to 2dir Cannot download non-regular file: /tmp/test/2dir/ Fetching /tmp/test/3file to 3file
Created attachment 3363 [details] Add -N flag to override quiet mode Ah, I changed that because a few people thought the verbose output was too noisy for scripted use. Anyway, this patch adds a -N flag ("noisy") that clears quiet mode: [djm@djm openssh]$ ./sftp -Nb /tmp/b localhost Connected to fuyu. sftp> cd /bin sftp> get ls /tmp Fetching /bin/ls to /tmp/ls sftp> get xxls /tmp File "/bin/xxls" not found.
Created attachment 3364 [details] correct patch oops, wrong patch. This one does it correctly.
this has been committed and will be in openssh-8.3 - thanks
close bugs that were resolved in OpenSSH 8.5 release cycle