How to connect GCP, VM machine with WinSCP

I created Virtual machine (VM) instance in the GCP but unable to connect with WinSCP from the windows machine.

I created on VM instance in the GCP then generated pub key by using command ssh-keygen and upload in the WinSCP advanced-->SSH-->Authentication-->Private Key file. Then try to connect by user name but getting failed.


Solution 1:

To setup a public key authentication to GCE, you need to paste your public key to "Metadata" page of your project on Google Cloud Platform.

For details, see WinSCP guide to connecting to GCE.