Hello!
I have a decentralized setup with a distributed master dvc cache in a private server, it is behind a jump server (proxy).
My guess is that dvc can be configured in a similar way to rsync. As far as I know (please, correct me if I'm wrong), there are several ways to set this up:
~/.ssh/config with the necessary host (ProxyJump variable in modern OS, but not supported by pramiko or ProxyCommand for the rest)
- port forwarding (less than ideal)
- rsync
-e option (obviously, not available in dvc)
I am able to get rsync working with all three options. But I can only get dvc to work when doing port forwarding.
I think the problem comes from paramiko (see paramiko/issues/512), but I report it here just in case you had other possible solutions or want to point out anything.
Just for completeness, here is the ssh config (replacing *.server with the real servers):
Host backup.server
ProxyCommand ssh -q -W %h:%p gblanco@jump.server
And the local dvc config:
['remote "decentralized_dvc"']
ask_password = true
url = ssh://gblanco@backup.server:/home/gblanco/dvc
[core]
remote = decentralized_dvc
Also, a minimum (not) working example with paramiko:
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
sock = paramiko.ProxyCommand('ssh -q -W %h:%p gblanco@jump.server')
ssh.connect('backup.server', port=22, username='gblanco', banner_timeout=100, sock=sock)
stdin,stdout,stderr = ssh.exec_command("ls .")
ssh.close()
In my honest opinion, support for rsync or more customization in the ssh side could help a lot, since it seems to be a common use case. What do you think?
Best,
Guillermo.
Hello!
I have a decentralized setup with a distributed master dvc cache in a private server, it is behind a jump server (proxy).
My guess is that dvc can be configured in a similar way to rsync. As far as I know (please, correct me if I'm wrong), there are several ways to set this up:
~/.ssh/configwith the necessary host (ProxyJump variable in modern OS, but not supported by pramiko or ProxyCommand for the rest)-eoption (obviously, not available in dvc)I am able to get rsync working with all three options. But I can only get dvc to work when doing port forwarding.
I think the problem comes from paramiko (see paramiko/issues/512), but I report it here just in case you had other possible solutions or want to point out anything.
Just for completeness, here is the ssh config (replacing *.server with the real servers):
And the local dvc config:
Also, a minimum (not) working example with paramiko:
In my honest opinion, support for rsync or more customization in the ssh side could help a lot, since it seems to be a common use case. What do you think?
Best,
Guillermo.