Hello i have a problem, i want to be able to connect to my second server with ssh from the first one: i explain myself :
- i have instance wordpress
- i have a second instance database
- i add ssh-keys of my computer to metadata
so adding ssh-keys from my computer to metadata allow me to be able to connect to both server from my computer with ssh <ip_of_instance>.
But when i try to ssh <database_ip> from the server wordpress it says : "Permission denied".
I use gcp and terraform, so if you can tell me what could i had in my terraform to make it happen the way i want that would be great. Thanks a lot.
Hello @Arout,
Welcome to Google Cloud Community!
Please make sure that you have set up SSH keys correctly for both instance A and instance B. SSH keys are used for authentication, and you need the public key on instance B and the private key on instance A.