mirror of
https://github.com/nestriness/cdc-file-transfer.git
synced 2026-02-04 14:55:37 +02:00
In a future CL, we will switch from scp to sftp. This CL adds support for calling sftp from RemoteUtil. In order to maintain backwards compatibility where people still set --scp-command or CDC_SCP_COMMAND instead of the sftp versions, this CL also adds the helper method RemoteUtil::ScpToSftpCommand, which attempts to convert an scp command to an sftp command. This is usually possible since the args are almost the same. For instance, if the scp command is C:\path\to\scp.exe -P 1234 -i <key_file> -oUserKnownHostsFile=known_hosts then the corresponding sftp command is most likely C:\path\to\sftp.exe -P 1234 -i <key_file> -oUserKnownHostsFile=known_hosts This works for instance for OpenSSH.
8.8 KiB
8.8 KiB