Why I cannot execute command on remote host. Do I miss something?
Bash file: hello.sh
#!/bin/sh
host_name="myHost"
ssh $host_name '
STR="Hello World!"
echo $STR
'
executing above file: the print out:
> ./print_node_status.sh
Enter Windows password:
STR=Hello World!: Command not found.
STR: Undefined variable.