I need to call an ssh command from a Windows command prompt that will execute a command on a remote Linux machine. The command accepts two string parameters, one of which can potentially be multi-lined. Basically, my call looks something like this:
ssh user@server command parameter1 parameter2
This fails miserably when there are spaces in the parameters. I've tried to escape the parameters with ', but those are stripped by the Windows box, and the Linux then mangles the parameters. I've tried also ", and those ok by the Windows box, but the Linux just ignores them. The version where I use both, like this
ssh user@server command "'para meter 1'" "'para meter 2'"
kinda-sorta works, but now I have the problem of in-line quotes. Is there any standard way that I would make both Linux and Windows understand both spaces, single and double quotes?