I am trying to execute a single command over ssh that contains `sub-code` or $(sub-code) (I use it all the time but I don\'t know the official name for that) to
ssh
The workaround is to create an sh file with the command then pass it to ssh command:
test.sh
echo `uname -a | awk '{print $2}'`
and command:
ssh myServer 'bash -s' < test.sh
UPDATE:
The command without quotes works fine as well:
ssh myServer uname -a | awk '{print $2}'