Last Updated: February 25, 2016
·
607
· sadfuzzy

Execute commands through ssh

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

or

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