I was wondering if /bin/bash made sense on the machine you are sending the commands.
It was a long time ago, but I remember that I finally managed not to need to disable echo of executed commands, when removing all the sensitive data in the commands.
I've seen you reported this issue because of a log less clear to read and harder to inspect. In that case, please, check that /bin/bash makes sense on the machine you are sending the commands.
I think that only:
works on the machine where Jenkins is running (Execute shell step), because the use of Unix Shell is implicit. When sending commands (Publish over SSH step), I had to make explicit the use of Unix Shell.
In other words:
is the same as:
I hope this information is useful for you in order to find out the solution. Otherwise, so sorry if my comment/workaround made this issue to be resolved. Just Reopen Issue in order to get a solution for you.
Hi nux, which Operating System is Jenkins running on?