← Back to team overview

duplicity-team team mailing list archive

Re: [Question #670362]: sftp backend ssh options

 

Question #670362 on Duplicity changed:
https://answers.launchpad.net/duplicity/+question/670362

    Status: Open => Answered

edso proposed the following answer:
On 21.06.2018 10:27, Simon wrote:
> New question #670362 on Duplicity:
> https://answers.launchpad.net/duplicity/+question/670362
> 
> I'd like to backup to a host via sftp using ProxyCommand:
> 
> duplicity --ssh-options='--oProxyCommand=ssh -q -W %h:%p user@gatekeeper'  /path/to/src paramiko+sftp://user@host//path/to/dst
> 
> It seems that -ssh-options is completely ignored. Also if I try  to change the port instead, it still attempts to connect to port 22.
> 
> Why aren't the settings in ~/.ssh/config used by duplicity?
> 

paramiko is a python native ssh implementation and as such does not support the same parameters as the openssh binary does. see http://duplicity.nongnu.org/duplicity.1.html
"
--ssh-options options
Allows you to pass options to the ssh backend. 
..SNIP..

NOTE: The ssh paramiko backend currently supports only the -i or -oIdentityFile setting. If needed provide more host specific options via ssh_config file.
"

what and if a setting from ssh_config is used by paramiko needs to be
investigated by yourself. i know some are, but am not sure that they
support all.

if you really need to use --oProxyCommand consider using pexpect+sftp// and make sure that the parameter is properly quote wrapped as it is inserted into the ssh command line. eg.
  '--oProxyCommand="ssh -q -W %h:%p user@gatekeeper"'

..ede/duply.net

-- 
You received this question notification because your team duplicity-team
is an answer contact for Duplicity.