Why am I losing shell command output? (in this case via ssh to an Ubuntu Raspberry Pi)
$ ssh pi@192.168.4.1 bash -l -c 'echo 111'
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
^^^ does not print 111. It seems like the first line is being lost:
$ ssh pi@192.168.4.1 bash -l -c 'echo 111 && echo 222'
SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.
222
(-l makes no difference)
It works fine from on the host:
pi@raspberrypi:~ $ bash -c 'echo 111'
111