Advertisement
GarnetStar

Call remote server via ssh from Bitbucket pipeline

Feb 25th, 2020
2,296
Never
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
RAW Paste Data Copied
Advertisement