# Failed to connect with local ssh

**URL:** <https://forums.balena.io/t/failed-to-connect-with-local-ssh/22611>\
**Category:** Product support\
**Created:** [July 28, 2019, 1:42pm UTC](https://forums.balena.io/t/failed-to-connect-with-local-ssh/22611 "2019-07-28T13:42:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xamsak](https://avatars.discourse-cdn.com/v4/letter/x/c67d28/32.png) [@xamsak](https://forums.balena.io/u/xamsak)\
**Post date:** [July 28, 2019, 1:42pm UTC](https://forums.balena.io/t/failed-to-connect-with-local-ssh/22611/1 "2019-07-28T13:42:46Z")

</div>

hello,

Most of the times i cant connect with local ssh command with balena cli

1. First i run **balena login** (successfully).
2. Second i run **balena local scan** and i see the right response :  
**Reporting scan results**  
\*\* host: bc22465.local\*\*  
\*\* address: 192.168.1.3\*\*  
\*\* dockerInfo:\*\*  
\*\* Containers: 15\*\*  
\*\* ContainersRunning: 8\*\*  
\*\* ContainersPaused: 0\*\*  
\*\* ContainersStopped: 7\*\*  
\*\* Images: 16\*\*  
\*\* Driver: aufs\*\*  
\*\* SystemTime: 2019-07-28T13:23:52.416392093Z\*\*  
\*\* KernelVersion: 4.14.98\*\*  
\*\* OperatingSystem: balenaOS 2.38.0+rev1\*\*  
\*\* Architecture: aarch64\*\*  
\*\* dockerVersion:\*\*  
\*\* Version: 18.09.6-dev\*\*  
\*\* ApiVersion: 1.39\*\*
3. And in the end i try **balena local ssh bc22465.local – host** or **balena local ssh localip** and the responses are :  
ssh: Could not resolve hostname bc22465.local: No such host is known.  
ECONNRESET: socket hang up  
respectively

Does anyone know what do i do wrong?  
Thanks  
Sakis

---

<div class="post-metadata">

**Author:** ![hedss](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/hedss/32/210_2.png) [@hedss](https://forums.balena.io/u/hedss)\
**Post date:** [July 29, 2019, 11:22am UTC](https://forums.balena.io/t/failed-to-connect-with-local-ssh/22611/2 "2019-07-29T11:22:02Z")

</div>

Hi there @xamsak,

A couple of things here might possibly be the reason. We’ve recently deprecated the `local` set of commands (from `balena-cli` version `11.0.0` upwards, so I’d suggest the first thing to do is to upgrade the client with `npm -g i balena-cli` to get the latest version.

Secondly, it sounds as if there might be an issue with the DNS resolver on the machine you’re running `balena-cli` on, as it doesn’t appear to be able to resolve the MDNS address of the device. Could you let us know which OS you’re using on this machine, as it will allow us to determine if you’re using Avahi or Bonjour (and also the version of the OS, please).

Best regards, Heds

---

<div class="post-metadata">

**Author:** ![xamsak](https://avatars.discourse-cdn.com/v4/letter/x/c67d28/32.png) [@xamsak](https://forums.balena.io/u/xamsak)\
**Post date:** [July 30, 2019, 8:06am UTC](https://forums.balena.io/t/failed-to-connect-with-local-ssh/22611/4 "2019-07-30T08:06:26Z")

</div>

Hello,

Finally i did it with balena-cli on a linux host and everything works fine. I dont know why that was happend when i was running this commans to balena-cli on windows 10.  
The balena Os i use is balenaOS 2.38.0+rev1 and the ttype is Raspberry Pi 3 (using 64bit OS) (BETA).

Thanks anyway!

---

<div class="post-metadata">

**Author:** ![nghiant2710](https://avatars.discourse-cdn.com/v4/letter/n/90db22/32.png) [@nghiant2710](https://forums.balena.io/u/nghiant2710)\
**Post date:** [July 30, 2019, 9:25am UTC](https://forums.balena.io/t/failed-to-connect-with-local-ssh/22611/5 "2019-07-30T09:25:45Z")

</div>

Glad to know that it works when you run on a Linux host, is there any chance you can provide us some more details about the windows 10 host that you had the issue with? It will help us replicate and track the issue.
