Skip to content

Latest commit

 

History

History
34 lines (21 loc) · 406 Bytes

zuo-publish-over-ssh.md

File metadata and controls

34 lines (21 loc) · 406 Bytes

實作:Publish over SSH

在部署應用服務的伺服器上,建立新使用者:

adduser deploy

複製 Public Key 到伺服器:

ssh-copy-id deploy@localhost

透過 SSH 執行指令:

ssh deploy@localhost ls -al

複製檔案到遠端伺服器:

scp [FILENAME] deploy@localhost:~/[DIR]

產生 SSH Key:

ssh-keygen -t rsa