mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-05-02 10:53:06 +03:00
[cdc_rsync] [cdc_stream] Switch from scp to sftp (#66)
Use sftp for deploying remote components instead of scp. sftp has the advantage that it can also create directries, chmod files etc., so that we can do everything in one call of sftp instead of mixing scp and ssh calls. The downside of sftp is that it can't switch to ~ resp. %userprofile% for the remote side, and we have to assume that sftp starts in the user's home dir. This is the default and works on my machines! cdc_rsync and cdc_stream check the CDC_SFTP_COMMAND env var now and accept --sftp-command flags. If they are not set, the corresponding scp flag and env var is still used, with scp replaced by sftp. This is most likely correct as sftp and scp usually reside in the same directory and share largely identical parameters.
This commit is contained in:
@@ -43,12 +43,12 @@ class LocalAssetsStreamManagerClient {
|
||||
// |user_host| is the Linux host, formatted as [user@:host].
|
||||
// |mount_dir| is the Linux target directory to stream to.
|
||||
// |ssh_command| is the ssh command and extra arguments to use.
|
||||
// |scp_command| is the scp command and extra arguments to use.
|
||||
// |sftp_command| is the sftp command and extra arguments to use.
|
||||
absl::Status StartSession(const std::string& src_dir,
|
||||
const std::string& user_host,
|
||||
const std::string& mount_dir,
|
||||
const std::string& ssh_command,
|
||||
const std::string& scp_command);
|
||||
const std::string& sftp_command);
|
||||
|
||||
// Stops the streaming session to the Linux target |user_host|:|mount_dir|.
|
||||
// |user_host| is the Linux host, formatted as [user@:host].
|
||||
|
||||
Reference in New Issue
Block a user