# Balena ssh problem

**URL:** <https://forums.balena.io/t/balena-ssh-problem/368090>\
**Category:** balenaOS\
**Tags:** ssh\
**Created:** [June 7, 2023, 1:59pm UTC](https://forums.balena.io/t/balena-ssh-problem/368090 "2023-06-07T13:59:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leninvm](https://avatars.discourse-cdn.com/v4/letter/l/a5b964/32.png) [@leninvm](https://forums.balena.io/u/leninvm)\
**Post date:** [June 7, 2023, 1:59pm UTC](https://forums.balena.io/t/balena-ssh-problem/368090/1 "2023-06-07T13:59:50Z")

</div>

I am trying to use `balena ssh` command to access into a container. I already put my public key into the preferences, but I am not able to connect to this container.  
I’m using the following command:  
`balena ssh UUID dev`

And it show me the following message:

```auto
user@ssh.balena-devices.com: Permission denied (publickey).
SSH: Remote command "host UUID" exited with non-zero status code "255"

Are the SSH keys correctly configured in balenaCloud? See:
https://www.balena.io/docs/learn/manage/ssh-access/#add-an-ssh-key-to-balenacloud
Are you accidentally using `sudo`?

```

---

<div class="post-metadata">

**Author:** ![alanb128](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/alanb128/32/2839_2.png) [@alanb128](https://forums.balena.io/u/alanb128)\
**Post date:** [June 8, 2023, 9:01pm UTC](https://forums.balena.io/t/balena-ssh-problem/368090/2 "2023-06-08T21:01:44Z")

</div>

Hello, are you using a production or development edition of balenaOS? Also, which version of the OS? If it’s a production version, you will need to copy the ssh public key into config.json as described here: [meta-balena/README.md at master · balena-os/meta-balena · GitHub](https://github.com/balena-os/meta-balena/blob/master/README.md#sshkeys)

---

<div class="post-metadata">

**Author:** ![leninvm](https://avatars.discourse-cdn.com/v4/letter/l/a5b964/32.png) [@leninvm](https://forums.balena.io/u/leninvm)\
**Post date:** [June 8, 2023, 9:42pm UTC](https://forums.balena.io/t/balena-ssh-problem/368090/3 "2023-06-08T21:42:09Z")

</div>

We are using `Production balenaOS 2.107.23`. I am using balena-cli in Ubuntu x86, I tried with ubuntu arm and it works perfectly, my team use Mac ARM and works for them.

Actually If I access through ssh to an ARM server and use the same key (ForwardAgent yes) to run `balena ssh ...` it works.

It could be related to the SO on my side?
