Execute comandos através de ssh

ssh deployer@server 'bash -s' < local_script.sh

ou

ssh deployer@server "bash -c  'export DATE=$(date +"%d_%m_%Y") && echo $DATE > date.txt'"