[openssh-unix-dev] Re: Possible feature request: sync_on_close mode for scp/sftp uploads

David Bronder david-bronder at uiowa.edu
Thu Jul 1 12:09:00 EST 2010


Jeremy Friesner wrote:
> 
> Many thanks, that works like a charm for sftp sessions... I can't
> seem to get it to work for scp uploads though.  Is there some nuance
> that I'm missing?
> 
> For reference, here is what I put at the end of my /etc/ssh/sshd_config file:
> 
> Subsystem scp /usr/lib/openssh/scp-and-sync
> Subsystem sftp /usr/lib/openssh/sftp-server-and-sync

scp is not a subsystem.  For your use case, you'll want to rename the
existing scp to something else (e.g. "scp.bin") and rename your wrapper
to "scp" (in the same location as the original scp).

Note that the workaround for sftp will only work if the SFTP session
completes and the connection is closed.  If a file is transferred but
the SFTP session is still open when the power is cut, you won't have
the sync (it won't run until sftp-server exits)...


-- 
Hello World.                                    David Bronder - Systems Admin
Segmentation Fault                                     ITS-SPA, Univ. of Iowa
Core dumped, disk trashed, quota filled, soda warm.   david-bronder at uiowa.edu


More information about the openssh-unix-dev mailing list