Smart way on how to use SSH keys from or with Bitbucket Pipelines

ms_8__ April 7, 2020

This is our setup:

  1. Multiple users with seperat bitbucket accounts working together on BB repos
  2. New SSH Key are generated within BB for every project
  3. BB SSH public key is added to the .authorized_keys file on the STAGE or MASTER Server
  4. BB SSH public key is also added to the BB "Access keys"
  5. Deployment works via BB Pipelines

So with setup ssh-commands, rsyncs to the remote etc. works pretty well as long the commands are running in the BB pipeline. And that is my problem.

 

To take it step further I dont just want to "send" updates via the BB pipelines one way to the remotes. I also want to receive files and db-dumps etc to my local system which leds into the following questions:

  1. Is it possible to run Pipeline-Scripts that actually send data back to my local system like an ssh reverse tunnel?
  2. As there is an VSCode plugin for BB: Can I autosync the SSH-keys from the BB project I'm working on to my local machine so that I can send ssh-requests to the BB known hosts without pushing my local ssh keys into these?

Thanks for any hint

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events