Access repository over SFTP transport
Following on from #13, access the repository over SFTP, probably using https://docs.rs/ssh2/.
This is mostly implemented in https://github.com/sourcefrog/conserve/tree/sftp.
The code for this works in a branch, but not on the released version of SSH2, because of https://github.com/alexcrichton/ssh2-rs/issues/251.
Releasing this in Conserve was blocked on https://github.com/alexcrichton/ssh2-rs/issues/278, a new release of SSH2 that includes the fixes for readdir, but that is now fixed.
Still to do:
- [x] Use the released version of ssh2.
- [ ] Merge up to master.
- [ ] Make the dependency optional?
- [ ] Document that SSH support exists
- [ ] Set a default remote username the same as the local username: at present the default is "" which is rejected with an unclear message
- [ ] At least, document that authentication is only from an ssh-agent
- [ ] Add some option to permit authentication other than by an agent: a key file, password, etc?
Alternatively, SSH could be supported based on https://docs.rs/openssh-sftp-client/latest/openssh_sftp_client/ and https://docs.rs/openssh/0.10.1/openssh/. That would
- Only work on Unix.
- Respect all your local configuration of SSH, since it literally runs external
ssh. - Authenticate in whatever way is configured in to SSH, without needing every method to be specifically supported in Conserve.
There is now https://docs.rs/openssh-sftp-client/latest/openssh_sftp_client/ which might be more promising:
- Uses external
sshto authenticate so will inherit configuration - May be more actively maintained?