title: Trigger download "event" of GCPs SSH-in-Browser from a script?
body: <p>On the top right corner of the SSH-in-Browser terminal for a Compute Engine, there is a download button. What I'd like to do is trigger this functionality directly from the VM terminal.</p>
  <p><strong>Why?</strong></p>
  <p>Every once in a while, I'm requested to make a copy of a database for any reason. So far, this requires me to 1) Make the dumps, 2) Zip the dumps, 3) Download the zip and 4) Send it to whoever requested it. I decided to automate this since its becoming more frequent.</p>
  <p>So far, 1 and 2 are done, and I would usually leave it at that, but I'm wondering if I can just trigger the &quot;downloading function&quot; from the script that handles the dumps and zipping, just to save me a few clicks and writing down the path. For example:</p>
  <pre class="lang-bash prettyprint-override"><code>#!/bin/bash
  
  here=$(pwd)
  
  mkdir /home/me/back
  mkdir /home/me/back/data
  /home/me/saveTables $1
  /home/me/saveRecords $1
  cd /home/me/back
  zip -r $here/$1.zip ./* &gt; /dev/null
  sudo rm -dr /home/me/back
  
  # and then download it with something like 
  # 'gcpdk' is made up just for example purposes
  gcpdk --download $here/$1.sql
  </code></pre>
  <p>Is this possible from the SSH-in-Browser at all? So far I'm guessing that the download function is not accessible from within the VM terminal, but I have not found documentation about the downloads themselves yet, so I can't tell. Or perhaps this is something I should do with a different tool?</p>
  <p>By the way, I can't copy files to Cloud Storage (Lack the permissions) so at least for now, that is not an option.</p>
  <p>Any help, link or confirmation of whether or not this is doable is welcome.</p>
  <p>And just to be extra sure: This is not something critical. Its just me being lazy. Cheers!</p>