Literal single quotes in commands

I’m trying to run a remote ssh command like this:
run: ssh user@host 'command1 arg1 && command2 arg2'

This works fine when I ssh into a CircleCI container, but I get this in the build log:

`#!/bin/bash --login
ssh user@host ‘command1 arg1 && command2 arg2’

/bin/bash: ssh user@host command1 arg1 && command2 arg2: No such file or directory Exited with code 127`

It looks like it’s passing the single quotes, but perhaps it’s not? I’ve tried using a ‘>’ block too. Any ideas? ssh is in the path, so it seems like a YAML string issue.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.