DVC ssh error. [Errno 111] Connect call failed

Hi,
When I tried to download one file through dvc using ssh from my Mac, it has steps and error as below. It seems connection issue from my Mac to server, but I can ssh or sftp to the server from my Mac. It works for “dvc pull” if I set up the local repo on server and remote repo on the same server not using ssh. “dvc remote add -d myremote /mypath/dvcstore”. I follow this doc: SSH & SFTP

I also tried create a local repo on the server, set up “dvc remote add -d myremote ssh://myusername@server:2222/mypath/dvcstore”. It get the same error as below.
I’m stuck for several days, really appreciate your help!

pip install dvc_ssh
dvc remote add -d myremote ssh://myusername@server:2222/mypath/dvcstore
Setting ‘myremote’ as a default remote

dvc pull dir_test
ERROR: unexpected error - Multiple exceptions: [Errno 111] Connect call failed (‘10.68..’, 2222), [Errno 111] Connect call failed (‘10.68..’, 2222)
Having any troubles? Hit us up at Support | Platinum Services For MLOps, we are always happy to help!

Thanks,
Rita

Are you behind some firewall by chance, proxy?

Could you also check if you have some specific settings in your .ssh/config - could you share it please?

Also, are you using SSH keys a way to do auth?

Also, please share the dvc pull -v dir_test

Thanks.

Update:

  1. fixed for local repo on the same server as the remote server. Need to remove the port number 2222 and it works: “dvc remote add -d myremote ssh://myusername@server:/mypath/dvcstore”
  2. local repo on my Mac still has error connecting to remote server.
    I remove the port number and use the same one as in 1). My Mac firewall is active. I followed thoese steps in this doc
    SSH remote: unexpected error - Permission denied
    dvc remote modify --local myremote password YOUR_ASSPHRASE
    However, it still ask me for ssh key passphrase when dvc pull. I checked the passphrase is correct. Also test for dvc pull a single file, same error.

dvc pull -v dir_test
2024-09-23 15:12:35,592 DEBUG: v3.55.2 (pip), CPython 3.12.0 on macOS-13.7-arm64-arm-64bit
2024-09-23 15:12:35,593 DEBUG: command: /Library/Frameworks/Python.framework/Versions/3.12/bin/dvc pull -v dir_test
2024-09-23 15:12:37,753 DEBUG: Checking if stage ‘dir_test’ is in ‘dvc.yaml’
Collecting |0.00 [00:00, ?entry/s]
FetchingEnter passphrase for key ‘/Users//.ssh/id_ed25519’:
2024-09-23 15:12:46,415 ERROR: failed to connect to ssh (/rsrch8/home/tdccct/apps/dvcstore/files/md5) - Permission denied for user ychen52 on host seadragon: Permission denied for user ychen52 on host seadragon
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/sshfs/utils.py”, line 27, in wrapper
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/sshfs/spec.py”, line 97, in _connect
client = await self._stack.enter_async_context(_raw_client)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/contextlib.py”, line 647, in enter_async_context
result = await _enter(cm)
^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asyncssh/misc.py”, line 299, in aenter
self._coro_result = await self._coro
^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asyncssh/connection.py”, line 8834, in connect
return await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py”, line 510, in wait_for
return await fut
^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/asyncssh/connection.py”, line 453, in _connect
await options.waiter
asyncssh.misc.PermissionDenied: Permission denied for user ychen52 on host seadragon

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dvc_data/index/fetch.py”, line 117, in fetch
data.fs.exists(data.path)
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dvc_objects/fs/base.py”, line 451, in exists
return self.fs.exists(path)
^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/funcy/objects.py”, line 47, in get
return prop.get(instance, type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/funcy/objects.py”, line 25, in get
res = instance.dict[self.fget.name] = self.fget(instance)
^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dvc_ssh/init.py”, line 126, in fs
return _SSHFileSystem(**self.fs_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/fsspec/spec.py”, line 81, in call
obj = super().call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/sshfs/spec.py”, line 67, in init
self._client, self._pool = self.connect(
^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/fsspec/asyn.py”, line 118, in wrapper
return sync(self.loop, func, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/fsspec/asyn.py”, line 103, in sync
raise return_result
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/fsspec/asyn.py”, line 56, in _runner
result[0] = await coro
^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/tasks.py”, line 510, in wait_for
return await fut
^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/sshfs/utils.py”, line 29, in wrapper
raise PermissionError(exc.reason) from exc
PermissionError: Permission denied for user ychen52 on host seadragon

Fetching
2024-09-23 15:12:46,436 ERROR: failed to pull data from the cloud - 1 files failed to download
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dvc/commands/data_sync.py”, line 35, in run
stats = self.repo.pull(
^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dvc/repo/init.py”, line 58, in wrapper
return f(repo, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dvc/repo/pull.py”, line 30, in pull
processed_files_count = self.fetch(
^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dvc/repo/init.py”, line 58, in wrapper
return f(repo, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File “/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/dvc/repo/fetch.py”, line 200, in fetch
raise DownloadError(failed_count)
dvc.exceptions.DownloadError: 1 files failed to download

2024-09-23 15:12:46,443 DEBUG: Analytics is enabled.
2024-09-23 15:12:46,519 DEBUG: Trying to spawn [‘daemon’, ‘analytics’, ‘/var/folders/7k/51swwyys5gb2ky6dknfr9r10y8m77l/T/tmpoj682qmq’, ‘-v’]
2024-09-23 15:12:46,524 DEBUG: Spawned [‘daemon’, ‘analytics’, ‘/var/folders/7k/51swwyys5gb2ky6dknfr9r10y8m77l/T/tmpoj682qmq’, ‘-v’] with pid 61358

#Here is the .ssh/config
cat ~/.ssh/config
#Host github.com
Host github.
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_ed25519