I'm running an instance on debian-7-wheezy and I'm sort of new to the Google Compute Engine. I have looked through both the support requests on this site and the FAQ post on the Google website; however I found nothing that I could follow completely.
I know a small amount about Linux (managed a dedicated Debian box for about 6 months), but I can't access SSH from my home PC either.
I would love a step-by-step walkthrough on how I can go about accessing FTP/SFTP using WinSCP (or another file browser) and how I can access SSH from my home PC using Putty from creation of the instance to connection to the instance.
Thank you in advance for your help and sorry for being a newb.
To generate a new SSH key-pair on Windows workstations:
In the Key comment section, enter your Google username. The key should have the following structure:
ssh-rsa [KEY_VALUE] [USERNAME] where:
[KEY_VALUE] is the key value that you generated. [USERNAME] is your Google username.
Go to the metadata page for your project.
Click SSH Keys to show a list of project-wide public SSH keys. Click the Edit button so that you can modify the public SSH keys in your project.
For those using Mac, go to FileZilla > Settings > SFTP > Add Key File... and then select your private key (the one with no extension), and then FileZilla will convert it to a ppk file.
And then you will be able to connect to the vm without password :)
In order to setup SFTP you can follow the steps mentioned in the following article. http://www.howtoforge.com/mysecureshell_sftp_debian_etch
To setup putty for GCE instance you need to create a key pair and upload the public key to the metadata server using your developer console. You can find the steps on this article https://developers.google.com/compute/docs/console#sshkeys
Looks like a similar question to this one , Adding same answer here too
At a high level, these are the steps:
$ gcloud init
)$ gcloud compute ssh
)Assuming this question was asked here before this documentation from Google was available.
Also, I have recorded this, it might be helpful:
https://www.youtube.com/watch?v=9ssfE6ODpak
And just an FYI .. if the files that you need to transfer are pretty small in size then maybe you don’t need a SFTP client. Transfer directly from the console as seen here https://youtu.be/HEdXEEYOynE
Using gcloud (provided as part of Google Cloud SDK) connect to your instance using SSH.
If you are connecting for the first time, this will prompt you to create SSH keys. As part of this this will also create
.ppk
file which will be used to Putty to SSH into your instance.Download and Install FileZilla
Goto Edit->Setting->SFTP
Click on Add Key File button, and point it to the PPK file generated.
Once this is done, you can connect to your instance using FileZilla SFTP. Specify your instance's public IP address in the host field (stfp://instanceipaddress). You would not need to specify any password.
When you bring up VM on GCP you should update firewall rules:
Then update FTP to use passive port range 60000-65535. Then on client side use Passive mode.
Details and instructions (Russian) - http://sysadm.pp.ua/linux/proftpd-ubuntu-16-04.html