question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pull: from SSH remote, does not follow ProxyJump in ~.ssh/config

See original GitHub issue

Bug Report

Description

When an SSH remote needs to be reached via a ProxyJump connection, dvc pull cannot connect to it.

Reproduce

Set up ~/.ssh/config to allow connection to the server behind the proxy, example:

Host main
    ServerAliveInterval 60
    ServerAliveCountMax 10
    User memain
    HostName 1.2.3.4
    IdentityFile ~/.ssh/id_rsa
    ProxyJump meproxy@proxy.tld

Test ssh from the terminal to check the ProxyJump and SSH keys for both proxy and main are working:

melocal@local:~$ ssh main
memain@main:~$ exit

Pull the git repo to the local machine. Set up a local remote with the full SSH URL

melocal@local:~/dvc_repo$ dvc remote add --local fromlocal ssh://memain@main:/path/to/dvc/remote
melocal@local:~/dvc_repo$ cat .dvc/config.local
[cache]
    dir = cache
['remote "fromlocal"']
    url = ssh://memain@main:/path/to/dvc/remote

Trying to pull from the remote gives an SSH connection error:

melocal@local:~$ dvc pull -r from local
ERROR: unexpected error - [Errno 61] Connect call failed ('1.2.3.4', 22)

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

Expected

DVC pulls the data from the remote.

Environment information

Output of dvc doctor:

DVC version: 2.10.2 (pip)
---------------------------------
Platform: Python 3.8.5 on macOS-10.16-x86_64-i386-64bit
Supports:
	webhdfs (fsspec = 2022.5.0),
	http (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
	https (aiohttp = 3.8.1, aiohttp-retry = 2.4.6),
	ssh (sshfs = 2022.3.1)
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: local, ssh
Workspace directory: apfs on /dev/disk1s1s1
Repo: dvc, git

Additional Information (if any):

The verbose output was really long, and I didn’t want to go through and anonymise it all, but I can do it later if needed.

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

2reactions
miguelvalentecommented, May 30, 2022

Update!

I replaced proxyJump with ProxyCommand and now it works.

Host odm
    HostName 123.123.123.13
    User me
    IdentityFile ~/.ssh/id_rsa
    ProxyCommand ssh -W %h:%p bastion
    # ProxyJump bastion

0reactions
miguelvalentecommented, May 27, 2022

@pwrightkcl Can you share the steps on Linux. I’m simply doing what they say https://dvc.org/doc/start/data-management.

I can push to a brand new dir on a server iff i don’t have to go through a proxyjump.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial: How to Use SSH ProxyJump and SSH ProxyCommand
OpenSSH ProxyJump and ProxyCommand directives tell the SSH client how to connect to a remote server via an intermediary server — often ...
Read more >
SSH to remote hosts through a proxy or bastion with ProxyJump
The ssh command first creates a connection to the bastion host bastion-hostname (the host referenced, by nickname, in the remote host's ProxyJump settings) ......
Read more >
Remote SSH: Tips and Tricks - Visual Studio Code
To use an SSH config file, click on the remote indicator to bring up the remote commands, choose Open Configuration File, and select...
Read more >
SSH ProxyCommand example: Going through one host to ...
Our SSH ProxyCommand example setup. The SSH set up is as follows to remote hosts though a proxy or bastion with ProxyJump and...
Read more >
Can't connect through jumpbox · Issue #18 - GitHub
ssh /config to set up ProxyJump and ProxyCommands to get to their endpoints. Currently, it appears that VSCode Remote only supports a direct ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found