Wednesday, July 7, 2010
sftp(1) file transfer pipelining patch under development
The algorithm pipelines readdir/open/read/write calls with a small window for file handles and avoid unnecessary round trip delays.
This improved file transfer mechanism which is possible due to the flexibility of the SSH+SFTPv3 protocols, will allow administrators to securely transfer large quantities of small files in a much shorter time frame using sftp(1).
New regression tests are also being written to make sure this functionality will be 100% reliable and tested, in the current release and all future OpenSSH releases!
Thanks.
Monday, June 14, 2010
New sftp(1) regression tests
- get/put -r (recursive transfers)
- get/put -p (preserving files' atime and mtime)
- chown
- chgrp
- chmod
Saturday, June 5, 2010
OpenSSH 5.5 released!
- Unbreak sshd_config's AuthorizedKeysFile option for $HOME-relative paths
- Fix compilation failures on platforms that lack dlopen()
- Include a language tag when sending a protocol 2 disconnection message.
- Make logging of certificates used for user authentication more clear and consistent between CAs specified using TrustedUserCAKeys and authorized_keys
- * Allow contrib/ssh-copy-id to fail gracefully when there are no keys in the ssh-agent. bz#1723
- * Explicitly link libX11 into contrib/gnome-ssh-askpass2. bz#1725
- * Allow ChrootDirectory to work in SELinux platforms. bz#1726
- * Add configure.ac stanza for Haiku OS. bz#1741
- * Enable utmpx support on FreeBSD where possible. bz#1732
- * Use pkg-config to determine libedit linker flags where possible. bz#1744
The complete list of changes can be viewed on the OpenBSD 4.7 release notes
sftp(1) specific changes:
- Implement tab-completion of commands, local and remote filenames (requires libedit)
- Support most of scp(1)'s commandline arguments in sftp(1), as a first step towards making sftp(1) a drop-in replacement for scp(1). Note that the rarely-used "-P sftp_server_path" option has been moved to "-D sftp_server_path" to make way for "-P port" to match scp(1). Implements -2 -4 -6 -c -q -i -p -r switches
- Add recursive transfer support for get/put and on the commandline
The work started in Google Summer of Code 2009 is still going on, so stay tuned for updates.
Congratulations to the OpenSSH team for another great release!
Wednesday, May 13, 2009
Project Roadmap
Phase 1:
Add a different switch for destination port in sftp (-d)
If in the future we eliminate scp and instead create a softlink to sftp named "scp", we can implement old/new behaviour for -P switch according to the launched program name.
Implement -2 -4 -6 -c -q -i switches by passing them directly to ssh(1).
Phase 2:
Implement the -r switch, to implement recursive behaviour. This operation will be optimized by pipelining in a later phase.
Phase 3:
Implement -p switch, to preserve original file times. This switch will cause sftp to set/get the appropriate attributes in SSH_FXP_OPEN messages, or if needed, with a separate message.
Phase 4:
Implement -l switch, to limit bandwidth. Research the possibility of using scp's bwlimit().
Phase 5:
Review, improve if needed to close final bugs or implement any needed functionality, and merge tab completion patch with support for command completion, local file completion and optionally remote file completion, if the OpenSSH's dev team agrees on the remote functionality inclusion.
Phase 6:
Improve the user experience in the interactive client, such as allow a put/get with multiple files specified as parameters. Research for improvements for other commands, taking suggestions from the community and also getting inspiration from lftp client functionality.
Phase 7:
Improve sftp-server and/or sftp client so it can work on paths where some directories are traverse only, ie, not searchable, and design a solution which ideally will avoid extra round-trips.
Phase 8:
Implement the pipelining of readdir() calls, and pipelining of open/read/writes with a small window for file handles in sftp multi-file transfers to avoid unnecessary delays in multi small file transfers.
Test thoroughly for any regressions, and add new regression tests if necessary.
Phase 9:
Implement auto-tuning of best settings in each connection for –B buffer_size and –R num_requests of sftp client in order to get the best speed out of the network link. I will experiment with different values to understand how sftp will benefit the most in different network environments, and design an algorithm to automatically manage this settings.
I can make sftp use auto-tuning by default, or make it a command line parameter for the user to enable it on-demand, and document it on the man page.
Test this functionality extensively, ensure we don't introduce any security bug and add new regression tests if necessary.
Phase 10:
Research and implement support for resuming file transfers, using djm's existing patch for downloads.
Phase 11:
Write the documentation to all the previous work, and create regression tests for sftp's new funcitionalities and test it for compatibility with scp
If there's time left, close as much relevant bugzilla items as possible, such as:
Bug #430 - Could add option to sftp-server to disable write access
Bug #831 - Allow agent forwarding in sftp & scp
Tuesday, May 12, 2009
Phase 1 completed
Cheers