# SSH key error ... sometimes

**URL:** <https://forums.balena.io/t/ssh-key-error-sometimes/158124>\
**Category:** Product support\
**Created:** [July 21, 2020, 1:16pm UTC](https://forums.balena.io/t/ssh-key-error-sometimes/158124 "2020-07-21T13:16:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pitosalas](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/pitosalas/32/4181_2.png) [@pitosalas](https://forums.balena.io/u/pitosalas)\
**Post date:** [July 21, 2020, 1:16pm UTC](https://forums.balena.io/t/ssh-key-error-sometimes/158124/1 "2020-07-21T13:16:01Z")

</div>

These two things are inconsistent:

```
balena ssh dd641d8fd65c20db1b11ff990c762218
=============================================================
    Welcome to balenaOS
=============================================================
root@gopigo3:~#

```

but, the same device and app:

```
~/m/Balena-ROS-Melodic (gopigo3=) balena ssh gopigo3.local
root@gopigo3.local: Permission denied (publickey).
Warning: ssh process exited with non-zero 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

~/m/Balena-ROS-Melodic (gopigo3=)

```

and the same happens if I give a specific IP address.

Can you help me understand please?

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [July 21, 2020, 5:29pm UTC](https://forums.balena.io/t/ssh-key-error-sometimes/158124/2 "2020-07-21T17:29:14Z")

</div>

Hi,  
Can you clarify the version of the balena cli & the version & variant of balenaOS that you are using?  
Please note that using an ip or a `.local` address is only supported for the `development` variants of balenaOS or production versions were you have added your ssh keys during the provisioning process.  
Let me also point you to our docs for this:

> **[SSH access - Balena Documentation](https://www.balena.io/docs/learn/manage/ssh-access/#using-balena-ssh-from-the-cli)**
>
> Communicate with the host OS and service containers via SSH with balena

Kind regards,  
Thodoris
