# How to use scp to transfer files to a specific container?

**URL:** <https://forums.balena.io/t/how-to-use-scp-to-transfer-files-to-a-specific-container/276139>\
**Category:** Product support\
**Tags:** support, ssh\
**Created:** [March 20, 2021, 7:27pm UTC](https://forums.balena.io/t/how-to-use-scp-to-transfer-files-to-a-specific-container/276139 "2021-03-20T19:27:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KF95](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@KF95](https://forums.balena.io/u/KF95)\
**Post date:** [March 20, 2021, 7:27pm UTC](https://forums.balena.io/t/how-to-use-scp-to-transfer-files-to-a-specific-container/276139/1 "2021-03-20T19:27:22Z")

</div>

I know I can use `ssh -t -p 22222 root@device-ip "balena-engine exec -it <container_name> /bin/sh"` to grant access to a specific container within the balenaos host. Now I need to use scp to transfer files to a container. What would be the correct syntax that results in scp connecting to this container in the same way the aforementioned ssh command does?

---

<div class="post-metadata">

**Author:** ![mpous](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/mpous/32/4742_2.png) [@mpous](https://forums.balena.io/u/mpous)\
**Post date:** [March 22, 2021, 12:19pm UTC](https://forums.balena.io/t/how-to-use-scp-to-transfer-files-to-a-specific-container/276139/3 "2021-03-22T12:19:20Z")

</div>

Hello @KF95 thanks for your message.

Are you trying to send a file from your local computer to your device’s container? Did you check [this open issue](https://github.com/balena-io/balena-cli/issues/885)? Are you using balena CLI?

I usually do it the other way round with a `curl`. But it always depends on the use cases.
