I'm trying to pass an argument to ssh like so:
ssh user@host 'foo 2'
The problem is, foo is not defined on my host machine, only the server, and it gives me the error
sh: foo: not found
However, if I do
ssh user@host
$ foo 2
Then I get the expected output. How do I fix this?