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

raspberrypi3

#1

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
(upload://zclvqD69YsOZMtcywz9SudYW36y.PNG)

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


#4

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


#6

Hi,
Version are:

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

#9

Thanks @strantam! I’ve filed a bug report on the CLI repo and the CLI team will look into it: https://github.com/resin-io/resin-cli/issues/876


#11

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?


#12

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: