In this post, I will help you setup FileZilla to manage your files on Google Cloud Compute Engine. You can connect, transfer and edit files on your VM Instance remotely.
- Your Compute Engine Instance running.
- For setting up Compute Engine, see the Setting up Compute Engine Instance.
- For installing Nginx and PHP, see how to install LEMP in Compute Engine Instance.
- Domain name is pointed to your virtual machine.
- For setting up Cloud DNS, see the Setting up Google Cloud DNS for your domain.
- Google Cloud SQL Setup, see Setup Cloud SQL and connect with Compute Engine.
- Setup your website, Setting up your website in Google Cloud Platform.
Steps to Connect and Transfer files to Instance
- Download PuTTY and FileZilla.
- Generate SSH Keys and save them.
- Paste your Public Key in Google Cloud Instance.
- Setup Public-key Authentication in FileZilla.
- Establishing a secure connection to your Instance.
- Transfer files to the instance.
Download PuTTY and FileZilla
PUTTY is an SSH key generator to create a public/private key for encrypting the connections between Google Cloud Instance and FileZilla Client.
FileZilla Client is a tool to manage the website files remotely from your desktop.
Download PuTTY and FileZilla
Open the PUTTYgen tool and click the generate button.
Here a progress bar will appear and PuTTYgen will ask you to move the mouse around to generate randomness. So wave the mouse in circles over the blank area in the PuTTYgen window, and the progress bar will gradually fill up as PuTTYgen collects enough randomness.
When the progress bar reaches the end, PuTTYgen will begin creating the key.
When the key generation is complete, a new set of input fields will appear in the window to enter Key Comment.
Now change the Key Comment with your
Copy the generated public key from the top text field which starts with
ssh-RSA and ends with your
Paste your Public Key in Google Cloud Instance
Go to your Google Cloud account and navigate to Compute Engine >> VM Instances.
Click the Compute Engine Instance you need to access and click edit.
Scroll down to find the SSH section and click show and edit.
Click Add Item.
Now paste the key you copied from PUTTYgen tool in the provided field, once you have pasted the key you can see your
username you provided while creating the public key.
Update the instance by clicking the save button.
Go back to the PUTTYgen tool and save the private key safely on your local computer.
Now you can close the PuTTYgen tool.
Setup Public-key Authentication in FileZilla
Open FileZilla and go to Edit >> Settings.
From the left settings menu navigate to Connections >> FTP >> SFTP.
Click Add key file button and select the private key you just saved using PUTTYgen.
Establishing a secure connection to your Instance
To connect to your Google Cloud Instance you need the
IP Address of your instance and the
username you provided to create the public/private key.
In the FileZilla dashboard, in the Host field enter
sftp://IPaddress. In the Username field enter your
username. Click Quick Connect.
That’s all now you can connect to your VM instance with FileZilla and manage your files from your desktop.