I have been using FileZilla to manage files on my GCP VM using SFTP. I created a key pair using KeyGen on Ubuntu Linux, copied the pub key into the SSH Keys on my VM instance and loaded the private key into FileZilla, where it converted it to a ppk format. That worked great.

This weekend, my pub key expired, so I created a new key pair and placed the keys in the same way I had previously. But now, FileZilla gives me an error "Error: Disconnected: No supported authentication methods available (server sent: publickey)".

I tried putting the pub key in the VM instance, in the project, and in both places at once, but no combination has worked.

Per other solutions I found online, I have ensured that the local key files are in a folder that FileZilla has full access to.

I've been fighting with this for hours, and am at wit's end.

Edit: Here's the sequences of messages on FileZilla when I try to connect:

Status: Connecting to
Response:   fzSftp started, protocol_version=4
Command:    keyfile "/home/steve/.ssh/teamifi-key.ppk"
Command:    open "steve@" 22
Error:  Disconnected: No supported authentication methods available (server sent: publickey)
Error:  Could not connect to server

You could try to connect to the instance via browser (the SSH button on the cloud console) or a gcloud compute ssh command from the Cloud Shell to make sure that you are able to connect to the instance via SSH.

Then from the instance check the security logs (/var/log/secure) to see the reason why your connection is denied.

In the serial port logs of the instance you can also see if the SSH key metadata has been added, and if SSH connectivity has been denied and why. I hope this helps

  • Thanks for your suggestions. I can access my instance via the cloud console, and via the gcloud ssh command - these just aren't very convenient for transferring files. So I set up additional users and was using one of those with ssh keys in FileZilla when things stopped working. I looked for the /var/log/secure that you mentioned, and I don't have anything called secure in the log directory. I have auth.log, but trying to ssh into the instance does not produce any output in that log file. Same for syslog and user.log. Apr 4 '18 at 1:36
  • Hi, did you look in the log of the serial port of the instance ? You access the logs from the properties of the instance in serial port1 (Console)
    – Django
    Apr 6 '18 at 14:41

I don't know much about Google Cloud VM's, but MOTD can some time create that issue.

If there is a MOTD, test by removing it and test if connection now works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.