Unable to connect to VM in Gcloud using Filezilla

5,761 views
Skip to first unread message

Valentin Goikhman

unread,
Feb 22, 2015, 10:55:06 AM2/22/15
to gce-dis...@googlegroups.com
Hello,

I am trying to connect to VM in GoogleCloud.

about how to connect to VM in GoogleCloud. 

I was at step 3 "Set up your SFTP client to use your SSH keys".
I created a filezilla key in Edit->Settings->SFTP . However when I try to connect with Filezilla I get error:


Error: Disconnected: No supported authentication methods available (server sent: publickey)
Error: Could not connect to server


Seems that Google VM doesn't see the key that Filezilla trying to send it.
I tried different SFTP manager WinSCP, but I get exactly the same error.
I put 'sftp://' before the ip address of the server.

Could somebody help on it?

Thanks in advance ,
Valen

SammyV

unread,
Feb 23, 2015, 11:51:28 AM2/23/15
to gce-dis...@googlegroups.com
You mention "I created a filezilla key in Edit->Settings->SFTP". The SSH key file you need to enter there must have been generated previously, and must already be present on your local system before you try to connect. The easiest way to do so is to log into any of your VMs using the following command, and following on-screen instructions:

$ gcloud auth login

After login is complete, you can find the path to the key file with the following command:

$ cd && cd .ssh && pwd

More on the Cloud SDK (installation, use, etc...) can be found here [1].

Fact is, you may use an SSH key generated by any means you wish, but you then need to add them to your project or VM's configuration (you may use the Developers Console web portal for this) under the SSH keys section. More on this here [2], and here [3].

[1] - https://cloud.google.com/sdk/
[2] - https://cloud.google.com/compute/docs/console#sshkeys
[3] - https://cloud.google.com/compute/docs/instances#setting_up_ssh_keys_at_the_instance_level

Adrian Barbachano

unread,
Feb 23, 2015, 12:22:06 PM2/23/15
to gce-dis...@googlegroups.com

Hi Valen,


As you’ve tried WinSCP I understand that you are using Windows. If so, your SSH key (generated in Step 2) that is in your default home directory could be in C:\Users\<username>\.ssh\ if you are using Windows Vista or newer. Then, for the step number 3 you’ll need to load the .ppk file that you can find there.


Also, I have noticed that following the tutorial is not enough as per the Filezilla Wiki [1], for SFTP using key authentication you need to use Pageant [2]. Run it and you’ll see that it appears in the system tray. Right-click the icon and select "Add Key" and select your private key (PPK) file.

After that, you can try to connect to your instance using sftp://<your-external-ip-address> as host, your username and an empty password.

I hope it helps.

Regards,

Adrián B.


[1] https://wiki.filezilla-project.org/Howto

[2] http://the.earth.li/~sgtatham/putty/latest/x86/pageant.exe

Valentin Goikhman

unread,
Feb 23, 2015, 1:27:01 PM2/23/15
to gce-dis...@googlegroups.com
I previously generated the keys on my file system with accordance to the tutorial I was following.Then I was trying to use one of the keys I got hooking it through Edit->Settings->SFTP. Then Filezilla asked for the passphrase, regenerated non-password-protected key files and was trying I suppose to use it (in vain). 

Using pageant I was able to successfully connect with WinSCP and Putty console and that's fine for me.
However, Filezilla is still  refusing to connect to VM.

Valentin Goikhman

unread,
Feb 23, 2015, 1:44:24 PM2/23/15
to gce-dis...@googlegroups.com
Thanks Adrian,

using pageant I was able to connect with Putty command line and with WinSCP , but not with Filezilla.

Valen

Adrian Barbachano

unread,
Feb 24, 2015, 7:39:37 AM2/24/15
to gce-dis...@googlegroups.com

I’m glad to hear that you were able to connect using WinSCP and the PuTTY command line. This confirms that:

1- You don’t have any networking issue between your computer and your instance.

2- Your instance identifies your SSH key as one of the authorized keys for that user.


Having said this, it looks like an issue with FileZilla’s settings. Could you try to reset the configuration and try again?

In order to reset the configuration you can remove the files (after doing a backup) located at:

C:\Users\<username>\AppData\Roaming\FileZilla (%APPDATA%/FileZilla)


Please, remember to use Pageant again because is necessary to establish the connection.


If you are still having issues with FileZilla, could you tell us which version are you using? I have used FileZilla 3.10.1.1 and it works flawless.


Regards,

Adrián B.


Valentin Goikhman

unread,
Feb 24, 2015, 5:42:02 PM2/24/15
to gce-dis...@googlegroups.com
Win SCP and Putty command line work fine for me. I tried various ways to connect with FileZilla, but it seems that Filezilla doesn't use the .ppk file that it has created in a proper way or something. Filezilla version is 3.10.1.1 , running on Windows 7 64 bit version 6.1 .
I tried deleting the files in AppData\Roaming\FileZilla , tried to connect with Pageant running or not, I get the same error with Filezilla:
Error: Disconnected: No supported authentication methods available (server sent: publickey) Error: Could not connect to server

Anyway, thank you for help and I'm glad I can connect using different ways (with WinSCP ).

Saad Qureshi

unread,
Jun 11, 2015, 5:19:21 AM6/11/15
to gce-dis...@googlegroups.com
1 - Download PuTTYgen, and run it;
2 - Click the "Generate" button, and follow on-screen instructions;
3 - Once key generation has finished, enter your username on your server under "Key comment:";
4 - Save both public and private keys;
5 - Go to your project's Developers Console -->> Compute --> VM instances, and click on your VM's name. Scroll down the resulting page to the section named "SSH Keys", and click "Edit". This will present a new text box saying "Enter entire key data". Into this box you need to copy-paste the contents of the public key file you saved in the previous step (you can open the key file with Notepad). Then, click the blue "Save" button;
6 - Go to Filezilla -->> Settings -->> Connection -->> FTP -->> SFTP, and click the "Add keyfile..." button. There, select the private key file you saved in step 4. Save your changes;
7 - Now try connecting to the server, use external ip as a host name & using the same username as you did in step 3, leaving the password blank, and specifying port 22.

Vanna KHAN

unread,
Jul 22, 2015, 8:32:21 PM7/22/15
to gce-discussion, saad....@gmail.com
Hi Sadd,

When I copy-paste, it alerts: Invalid key. Required format: <protocol> <key-blob> <user...@example.com>

Thanks,
Vanna

Pop Palakorn

unread,
Feb 22, 2016, 9:50:16 AM2/22/16
to gce-discussion
Hello

I have this issue too and now my FileZilla can login

the problem is my username changed by google. you need to add your ssh code to "https://console.developers.google.com/project/$yourprojectid/compute/metadata/sshKeys" first

and you will see "username" in front of ssh key. use that username for your FileZilla


sorry for my bad English. I'm trying to learn English language

palakorn

Razi Khan

unread,
May 3, 2018, 11:57:15 AM5/3/18
to gce-discussion
Hi All,

I am new to google cloud , can someone please help me connect SFTP (winscp) google cloud VM. I am getting the error "Server refused our key"

Thanks
Razi
Reply all
Reply to author
Forward
0 new messages