New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use SFTP internally for SCP command #194
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good start and is less intrusive than I though it would be.
My comments are mostly nitpicks because this is clearly on a start of a path and not the end. I think to properly replace the scp protocol we'd need a few more things
- automatic sftp-scp fallback without need to reconnect if the remote end doesn't support sftp. This is probably possible using mux (perhaps mux-proxy) mode.
- some degree of bug-compatibility with scp's horrid file quoting (perhaps optional?)
- (eventually) inter-file pipelining of transfers, though this would require a fair amount of work on sftp-client.c
@mfriedl @daztucker can you take a look too?
1ca0e78
to
2f47dc8
Compare
|
Thank you for the comments. I addressed your suggestions in the current version. I will be able to follow-up no earlier than in August on the fallback to scp (thanks for suggesting the mux -- it could actually work that way). |
|
I had a quick first look and I think this looks great! |
|
Updated to resolve conflicts. I tried also to play with the fallback to scp from sftp, but the current code in sftp-client is really not ready for this as it calls fatal() in |
|
I rebased on current master and change default to SFTP to give it more testing. Any update from your side? |
|
I'd like to work on this if spare time permits. |
|
Can we please make quoting bug-compatibility optional? I really really would like to be able to avoid it in scripts. |
scp in openssh 8.7 will change to use sftp protocol. See openssh/openssh-portable#194 for details. This enables the sshd internal-sftp implementation so that newer scp versions will continue to work as expected. Note that the sshd service is only running during the installation if inst.sshd is passed on the kernel cmdline. Resolves: rhbz#2040770
scp in openssh 8.7 will change to use sftp protocol. See openssh/openssh-portable#194 for details. This enables the sshd internal-sftp implementation so that newer scp versions will continue to work as expected. Note that the sshd service is only running during the installation if inst.sshd is passed on the kernel cmdline. Resolves: rhbz#2040770
scp in openssh 8.7 will change to use sftp protocol. See openssh/openssh-portable#194 for details. This enables the sshd internal-sftp implementation so that newer scp versions will continue to work as expected. Note that the sshd service is only running during the installation if inst.sshd is passed on the kernel cmdline. Resolves: rhbz#2041770
Based on the discussion on mailing list [1], this is initial implementation of SCP mode using SFTP. Comments, suggestions, reviews, feedback welcomed.
[1] https://lists.mindrot.org/pipermail/openssh-unix-dev/2020-June/038594.html