I know it is not common to SSH to another Windows Machine, but it is not working.
I have tracked it and the reason is the part of hardcoding 'bash -se' in the command, and it is not recognized by Windows.
To fix it just remove 'bash -se' from getExecuteCommand() function:
from:
return "ssh {$extraOptions} {$target} 'bash -se' << \\$delimiter".PHP_EOL
.$commandString.PHP_EOL
.$delimiter;
to:
return "ssh {$extraOptions} {$target} << \\$delimiter".PHP_EOL
.$commandString.PHP_EOL
.$delimiter;
I know it is not common to SSH to another Windows Machine, but it is not working.
I have tracked it and the reason is the part of hardcoding
'bash -se'in the command, and it is not recognized by Windows.To fix it just remove
'bash -se'fromgetExecuteCommand()function:from:
to: