Advertisement
GarnetStar

Call remote server via ssh from Bitbucket pipeline

Feb 25th, 2020
4,663
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. image: node:10.15.3
  2.  
  3. pipelines:
  4.   default:
  5.     - step:
  6.         name: Build frontend
  7.         script:
  8.           - mkdir -p ~/.ssh
  9.           - cat my_known_hosts >> ~/.ssh/known_hosts
  10.           - (umask  077 ; echo $SSH_KEY | base64 -di > ~/.ssh/id_rsa)
  11.           - ssh -i ~/.ssh/id_rsa root@{remote server ip address} 'cd /app/react-api && ls -la'
Advertisement
Comments
  • Carla432
    83 days
    # text 0.29 KB | 0 0
    1. Enable Pipelines in your Bitbucket repository and configure it using the bitbucket-pipelines. ...
    2. Add the server (remote) deploy key to the repository.
    3. Set up the SSH key pair on the repository.
    4. Add the repository's public key to the server's authorized keys.https://buyozempiconlineireland.org/
Add Comment
Please, Sign In to add comment
Advertisement