Keywords: WordPress - Google Cloud Platform - Technical issue - Connectivity (SSH/FTP)
So, I’m reluctant to ask for support on this because I should be able to solve it myself, but I’ve read through both the Bitnami guide and Google’s (https://cloud.google.com/compute/docs/troubleshooting/troubleshooting-ssh) and nothing resonates with my problem.
I am trying to use WP-CLi to move a couple of websites between two Google Cloud VM instances - both under the same GCP project, both using the same SSH keys with the keys stored as metadata (at both project and VM level) under the same user, ‘bitnami’.
My SSH connections to both VM’s work flawlessley- I can access each VM via the Google Web Console, I can access both via PuTTY and with the tunnel open I can access PHPMyAdmin for both. So, my direct access via SSH works perfectly.
I have checked that the public key stored in /home/bitnami/.ssh/authorized_keys matches the SSH key stored in the Google Cloud console (for both my instance and project meta data). I have checked that OS Login is NOT enabled within the console and have even run the following to command line check - curl “http://metadata.google.internal/computeMetadata/v1/instance/attributes/enable-oslogin” -H “Metadata-Flavor: Google”, which produces a 404 error.
But when I run either of the following (scp or ssh) instructions within bash:
ssh bitnami@OTHER-SERVER-IP "cd /opt/bitnami/apps/MyApp > /dev/null&&wp --allow-root db export /tmp/the-old-wp-database.sql"
scp bitnami@OTHER-SERVER-IP:/opt/bitnami/apps/MyApp/htdocs/oldfile.txt /tmp/oldfile.txt
bitnami@OTHER-SERVER-IP: Permission denied (publickey).
Can you see any reason why this is failing? Is there anything about the Bitnami stack that would preclude this working?