Resin local ssh on win10: "syntax error near unexpected token `then'"

Local ssh ("resin local ssh ") fails with the following error when trying to connect, both to supervisor, and local app:

sh: -c: line 0: syntax error near unexpected token then' sh: -c: line 0:(if [ -f /usr/bin/balena ]; then echo \"balena\"; else echo \"docker\"; fi) exec -ti 748901cc1e35a844b777ca9d62126b8ebf19253873f4b75c0cc0edb24ef227b8 /bin/sh -c ‘if [ -e /bin/bash ]; then exec /bin/bash; else exec /bin/sh; fi’"’

"resin local ssh "![resinlocalssherror|690x430] --host command works.

Here is the detailed log when running the command with -v flag

Could someone help me what can be the couse of the problem?

Hi @strantam - what resin CLI version are you using, and what resinOS version is the device you’re trying to ssh into?

Version are:

  • resin-cli: 7.3.8
  • Resin OS: 2.12.6+rev1 (dev)

Thanks @strantam! I’ve filed a bug report on the CLI repo and the CLI team will look into it:

Hi @strantam, I’m investigating this now, but I can’t reproduce it. I think it might be environment-specific, and this is an error coming from your shell when the CLI tries to pass it a complex SSH command.

Could you let me know what OS you’re using, and what shell?

It looks like you’ve tried to include some attachments here too, but I can’t see them. Can you try to upload those again?

Hi pimterry,
I’m using win10, and so far I was trying with plain cmd, and git bash. Cmd fails with errormsg, but git bash has no feedback.

Here is the error from cmd: