SFTP keeps changing - What do i do?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi again all!

I've been getting harassments from various people for the last two
days after installing newer versions of OpenSSH. Especially people who
like to use batchfiles and batchmode with SFTP are having various
problems. Basically, they're getting fed up, and me too, with the
whole thing.

1) It looks like SFTP now exits when a command gives an error. You
have to give a stupid '-' before the command to prevent this. This
breaks compatibility with older versions, which crap out when you give
a '-' before the command.

2) The output of "ls" is now different. You have to give it an 'ls -l'
to get the long version.

We have to maintain about 200 different hosts. We can't just update
OpenSSH on all of them every time. Is there something like a
compilibility flags or compile option or something?

Re: SFTP keeps changing - What do i do?

Martijn Bruns wrote:

Quoted text here. Click to load it

User "rsync -e ssh" instead of sftp. sftp, like the "privilege
separation", is a relatively new tool and as you're encountering, is
still under development.

rsync is your *friend*: not only will it correctly duplicate things like
symbolic links, but it can be set not to copy the files unless they have

Re: SFTP keeps changing - What do i do?

Quoted text here. Click to load it

Yeah, i know about rsync. It's really nice, for some things.

Sftp does much more than Rsync, though. You can't really use Rsync to
move/remove/rename/touch (etc) files at the other side directly, which
is done quite frequently.

Also, i don't work alone. I'm not at liberty to tell every single
admin in our, rather large, IT organisation that they have to start
using rsync instead of sftp for everything.

Re: SFTP keeps changing - What do i do?

Replying to myself. I hope anyone still reads this thread.

The guys who make the sftp-scripts told me that it would be easily
possible to test for the OpenSSH-version, because the sftp changes
which implement the '-' before the commands work from the client side.
In short: they can fill a string with "" or "-" depending on the SSH
version and prepend that to the sensitive commands in the batchfile.

The only thing they want to know: Which version of OpenSSH implemented
this change? Can i find this somewhere, or does somebody know by

Thanks in advance.

Site Timeline