how to use ssh to run shell script on a remote machine?

ssh user@host <<'ENDSSH'
#commands to run on remote host
ENDSSH

LEAVE A COMMENT