# How do I use DVC with SSH remote

**URL:** <https://discuss.dvc.org/t/how-do-i-use-dvc-with-ssh-remote/279>\
**Category:** Questions\
**Created:** [December 11, 2019, 6:36am UTC](https://discuss.dvc.org/t/how-do-i-use-dvc-with-ssh-remote/279 "2019-12-11T06:36:33Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![Luux](https://avatars.discourse-cdn.com/v4/letter/l/c57346/32.png) [@Luux](https://discuss.dvc.org/u/Luux)\
**Post date:** [September 14, 2021, 12:14pm UTC](https://discuss.dvc.org/t/how-do-i-use-dvc-with-ssh-remote/279/21 "2021-09-14T12:14:06Z")

</div>

The problem still persists with 2.7.3 - if you use `ask_password`, you still get  
`ERROR: unexpected error - Passphrase must be specified to import encrypted private keys` if your key is encrypted. It also does not work if you `ssh-add`ed your key.

Downgrading to 2.5.4 solves the issue with the ssh agent for me.

---

<div class="post-metadata">

**Author:** ![Paffciu](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@Paffciu](https://discuss.dvc.org/u/Paffciu)\
**Post date:** [September 15, 2021, 9:58am UTC](https://discuss.dvc.org/t/how-do-i-use-dvc-with-ssh-remote/279/22 "2021-09-15T09:58:53Z")

</div>

@Luux, your problem should be fixed by [ssh: ask password before setting it by isidentical · Pull Request #6615 · iterative/dvc · GitHub](https://github.com/iterative/dvc/pull/6615)

---

<div class="post-metadata">

**Author:** ![Luux](https://avatars.discourse-cdn.com/v4/letter/l/c57346/32.png) [@Luux](https://discuss.dvc.org/u/Luux)\
**Post date:** [September 15, 2021, 10:37am UTC](https://discuss.dvc.org/t/how-do-i-use-dvc-with-ssh-remote/279/23 "2021-09-15T10:37:58Z")

</div>

@Paffciu Oh, that was fast! Thanks for the quick fix 🙂 (However, I’ll have to wait until next week before trying it.)

---

<div class="post-metadata">

**Author:** ![Paffciu](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@Paffciu](https://discuss.dvc.org/u/Paffciu)\
**Post date:** [September 15, 2021, 10:51am UTC](https://discuss.dvc.org/t/how-do-i-use-dvc-with-ssh-remote/279/24 "2021-09-15T10:51:59Z")

</div>

All the credit to @isidentical 🙂

---

<div class="post-metadata">

**Author:** ![dberenbaum](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dberenbaum](https://discuss.dvc.org/u/dberenbaum)\
**Post date:** [March 22, 2023, 2:03pm UTC](https://discuss.dvc.org/t/how-do-i-use-dvc-with-ssh-remote/279/25 "2023-03-22T14:03:13Z")

</div>

There’s now an official guide that incorporates a lot of this info thanks to @jorgeorpinel: [SSH & SFTP](https://dvc.org/doc/user-guide/data-management/remote-storage/ssh).

[Previous page](https://discuss.dvc.org/t/how-do-i-use-dvc-with-ssh-remote/279.md?page=1)
