remote deploy with ssh

遠端佈署時,常常更新完檔案要重新啟動服務,使用ssh execute remote command 可以整合在script方便automation

ssh $HOST COMMAND
ssh $HOST COMMAND1; COMMAND2; …

scp SCRIPT.sh $HOST:
ssh $HOST SCRIPT.sh #將多個command 放在script

以上使用SSH Key-Based Authentication的方式驗證

This entry was posted in System Administration. Bookmark the permalink.

Leave a Reply