# DVC push to SSH remote ERROR: No such file

**URL:** <https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203>\
**Category:** Questions\
**Created:** [June 8, 2022, 8:38am UTC](https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203 "2022-06-08T08:38:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![dmitry-kabanov](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@dmitry-kabanov](https://discuss.dvc.org/u/dmitry-kabanov)\
**Post date:** [June 8, 2022, 8:38am UTC](https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203/1 "2022-06-08T08:38:10Z")

</div>

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:

```auto
➜ 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!

---

<div class="post-metadata">

**Author:** ![dtrifiro](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@dtrifiro](https://discuss.dvc.org/u/dtrifiro)\
**Post date:** [June 8, 2022, 9:17am UTC](https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203/2 "2022-06-08T09:17:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dmitry-kabanov](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@dmitry-kabanov](https://discuss.dvc.org/u/dmitry-kabanov)\
**Post date:** [June 8, 2022, 9:26am UTC](https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203/3 "2022-06-08T09:26:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dtrifiro](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@dtrifiro](https://discuss.dvc.org/u/dtrifiro)\
**Post date:** [June 8, 2022, 9:28am UTC](https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203/4 "2022-06-08T09:28:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dmitry-kabanov](https://avatars.discourse-cdn.com/v4/letter/d/bcef8e/32.png) [@dmitry-kabanov](https://discuss.dvc.org/u/dmitry-kabanov)\
**Post date:** [June 8, 2022, 9:38am UTC](https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203/5 "2022-06-08T09:38:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dtrifiro](https://avatars.discourse-cdn.com/v4/letter/d/278dde/32.png) [@dtrifiro](https://discuss.dvc.org/u/dtrifiro)\
**Post date:** [June 8, 2022, 9:41am UTC](https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203/6 "2022-06-08T09:41:02Z")

</div>

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 🥳

---

<div class="post-metadata">

**Author:** ![alfred](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@alfred](https://discuss.dvc.org/u/alfred)\
**Post date:** [June 5, 2024, 4:00am UTC](https://discuss.dvc.org/t/dvc-push-to-ssh-remote-error-no-such-file/1203/7 "2024-06-05T04:00:44Z")

</div>

+1 I ran into the same issue and only solved it after reading this thread.
