here's the testcase: cd ~/ rm -rf test x mkdir -p x/test touch x/test/{1,2,3} cd x sftp localhost <<<'put -r .' with openssh-6.7 and older, you'd get: Connected to localhost. sftp> put -r . Uploading ./ to /home/vapier/. Entering ./ Entering ./test ./test/3 100% 0 0.0KB/s 00:00 ./test/2 100% 0 0.0KB/s 00:00 ./test/1 100% 0 0.0KB/s 00:00 starting with openssh-6.8, you get: Connected to localhost. sftp> put -r . Uploading ./ to /home/vapier/. Entering ./ and nothing is actually uploaded. the failure is due to the remote doing mkdir(/home/vapier/.), getting EEXIST, and then returning an error to the client which makes it stop. bisecting the public github repo shows the first bad commit is this one: https://github.com/openssh/openssh-portable/commit/7d845f4a0b7ec97887be204c3760e44de8bf1f32 (i had to cherry pick 0cdc5a3eb6fb383569a4da2a30705d9b90428d6b and 83b9678a62cbdc74eb2031cf1e1e4ffd58e233ae to get it to build) its parent obviously works fine too: https://github.com/openssh/openssh-portable/commit/139ca81866ec1b219c717d17061e5e7ad1059e2a it might be that the new one is doing more error checking, but it seems like the server or client should handle EEXIST correctly.
Thanks, fixed in https://github.com/openssh/openssh-portable/commit/e30cabfa4ab456a30b3224f7f545f1bdfc4a2517
Close all resolved bugs after release of OpenSSH 7.7.