CircleCI ssh to Ubuntu server to deploy
  1. 2.
    Add public key to authorized_keys by: cat .ssh/id_ed25519.pub > .ssh/authorized_keys (rename id_ed25519.pub by your public key)
  2. 3.
    Add a run step
- run:
name: "Prepare Environment"
command: |
if [ -z `ssh-keygen -F '1.1.1.1'` ]; then
ssh-keyscan -H '1.1.1.1' >> ~/.ssh/known_hosts
fi
ssh [email protected] 'cd src && ./autodeploy.sh'
Rename 1.1.1.1 by your ip server
​
Copy link