# SCP a file into a persistent volume

**URL:** <https://community.fly.io/t/scp-a-file-into-a-persistent-volume/2729>\
**Category:** Questions / Help\
**Tags:** elixir\
**Created:** [October 6, 2021, 10:03am UTC](https://community.fly.io/t/scp-a-file-into-a-persistent-volume/2729 "2021-10-06T10:03:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![jerome](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/jerome/32/17_2.png) [@jerome](https://community.fly.io/u/jerome)\
**Post date:** [October 6, 2021, 2:18pm UTC](https://community.fly.io/t/scp-a-file-into-a-persistent-volume/2729/2 "2021-10-06T14:18:29Z")

</div>

First, you’ll need to follow these instructions to create a wireguard connection locally: [Private Networking](https://fly.io/docs/reference/privatenetwork/#private-network-vpn)

Then you can do something like this:

- `flyctl ssh issue --agent`: this will register a ssh key with your local agent
- `scp priv/private_key.pem root@myapp.internal:/data/private_key.pem`

If you have more than 1 instance, you might need to replace `myapp.internal` with the actual IP (`flyctl ips private`)

---

_[View the full topic](https://community.fly.io/t/scp-a-file-into-a-persistent-volume/2729)._
