SSH connection to device in local mode fails

I want to access my devices in local mode through SSH from the CLI on my Windows 10 computer however i get the following error:

λ balena local ssh 192.168.1.49
? Select a container /local-app (cf524c5d4a6)
sh: $(if [ -f /usr/bin/balena ]; then echo "balena"; else echo "docker"; fi): No such file or directory
Connection to 192.168.1.49 closed.

It is the same for every container on the device. Does anybody know how to resolve this?

Hi,

Thanks for reporting this, the relevant engineer has been contacted and hopefully we’ll have an idea why this is happening soon.

In the meantime, there’s a bit of a workaround you can use to get into a local development device service container:

ssh -p 22222 root@<ipAddressOfDevice>
balena ps # To discover the service container UUID of the service you want to enter
balena exec -ti <containerUUID> /bin/sh

You might be able to use /bin/bash depending on the base image OS used for the service.

Best regards, Heds

Sorry for the slow response and thank you for yours!

This is working for me, thank you!