yuxg8q
Last Updated: February 25, 2016
·
473
· 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'"