Kyrat is almost complaint with ssh the problem comes with nested quotes.
This two commands differs:
ssh localhost -- bash -c \"ls -l\"
kyrat localhost -- bash -c \"ls -l\"
Also this:
ssh localhost -- bash -c \"bash -c \\\"ls -l\\\"\"
kyrat localhost -- bash -c \"bash -c \\\"ls -l\\\"\"