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'"
Written by Denis Savitskiy
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Shell
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#