DVC push to SSH remote ERROR: No such file

I do the Getting started guide.
When it is time to add a remote, instead of proposed S3 storage, I use an SSH remote that I add using the following command:

dvc remote add -d storage ssh://ws/hddb/data/dvc-tutorial

where ws is a hostname of a workstation with the SSH access enabled, and hddb/data/dvc-tutorial is the path to the directory in which I would like to keep the data. I actually execute this command being on the workstation through SSH (I can recursively ssh to this workstation when I am already ssh’ed to it).

Then I have to execute the following command to use passphrase-protected SSH keys:

dvc remote modify --local storage password my-lovely-passphrase

When I do dvc push to transfer data/data.xml from the Getting started guide, it fails when the following error:

➜ dvc push                                             
ERROR: failed to transfer 'md5: 22a1a2931c8370d3aeedd7183606fd7f' - [Errno 2] No such file or directory: No such file
ERROR: failed to push data to the cloud - 1 files failed to upload

What should I do to make an SSH remote work? Thank you!

Hey there,
it may be due to the username (and possibly port, if it’s not 22) missing from the ssh remote url. I’d try again with:

dvc remote add -d storage ssh://username@ws/hddb/data/dvc-tutorial

Hi @dtrifiro. I’ve just tried it with username added but it still gives the same error

Are you able to login using ssh username@ws? Does the path exist on the workstation and does the user you’re connecting as have the permissions to read/write to the given path?

Ooops, yeah, the problem was with the write permissions of the users for the directory path :slight_smile:
The error message was a bit misleading in that sense.
Dear @dtrifiro thank you very much!

I agree, the message is a bit misleading. If you want, you could open up an issue on github so that we can keep track of that.

Happy to hear that everything is working :partying_face:

1 Like