Moving files in Filezilla gives Disconnected: No supported authentication methods available (server sent: publickey)

0

1

I generated a new SSH key for my AWS instance on my local machine (with passphrase). Then SSHed into it and uploaded my public key in the authorized_keys.

I was able to connect and move files (get & put) successfully through the terminal (STFP). In FileZilla however, I was able to connect and view all files and move from my local machine to the server, but not from the server to my local machine. FileZilla keeps showing:

Disconnected: No supported authentication methods available (server sent: publickey)

What is the cause of this?

Update: Log

Status:         Connecting to 35.181.**.***...
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 0
Trace:          Going to execute /Applications/FileZilla.app/Contents/MacOS//fzsftp
Response:   fzSftp started, protocol_version=8
Trace:          CSftpDeleteOpData::ParseResponse() in state 0
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 2
Command:    keyfile "/Users/****/Desktop/svParis.ppk"
Trace:          CSftpDeleteOpData::ParseResponse() in state 2
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 3
Command:    open "ubuntu@35.181.**.***" 22
Trace:          Connecting to 35.181.**.*** port 22
Trace:          We claim version: SSH-2.0-FileZilla_3.43.0
Trace:          Server version: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
Trace:          Using SSH protocol version 2
Trace:          Doing ECDH key exchange with curve Curve25519 and hash SHA-256
Trace:          Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
Trace:          Host key fingerprint is:
Trace:          ssh-ed25519 256 62:2b:a1:ac:13:74:1a:c5:56:bf:82:74:d0:28:e2:8c HnCtld7UjEMzLCnnbrUUy9EVFmFMHI0fg7QnLBzqbCk=
Trace:          CSftpControlSocket::SetAsyncRequestReply
Command:    Trust new Hostkey: Once
Trace:          Initialised AES-256 GCM client->server encryption
Trace:          Initialised AES256 GCM client->server MAC algorithm (in ETM mode) (required by cipher)
Trace:          Initialised AES-256 GCM server->client encryption
Trace:          Initialised AES256 GCM server->client MAC algorithm (in ETM mode) (required by cipher)
Trace:          Pageant is running. Requesting keys.
Trace:          Pageant has 0 SSH-2 keys
Trace:          Private key in '/Users/****/Desktop/svParis.ppk' is encrypted, defer loading until use.
Trace:          Successfully loaded 1 key pair from file
Trace:          Offered public key from "/Users/****/Desktop/svParis.ppk"
Trace:          Offer of public key accepted, trying to authenticate using it.
Trace:          CSftpControlSocket::SetAsyncRequestReply
Command:    Pass: ***********
Trace:          Access granted
Trace:          Opening session as main channel
Trace:          Opened main channel
Trace:          Started a shell/command
Status:         Connected to 35.181.**.***
Trace:          CSftpDeleteOpData::ParseResponse() in state 3
Trace:          CControlSocket::ResetOperation(0)
Trace:          CSftpDeleteOpData::Reset(0) in state 3
Trace:          CFileZillaEnginePrivate::ResetOperation(0)
Status:         Retrieving directory listing...
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpListOpData::Send() in state 0
Trace:          CSftpChangeDirOpData::Send() in state 0
Trace:          CSftpChangeDirOpData::Send() in state 1
Command:    pwd
Response:   Current directory is: "/home/ubuntu"
Trace:          CSftpChangeDirOpData::ParseResponse() in state 1
Trace:          CControlSocket::ResetOperation(0)
Trace:          CSftpChangeDirOpData::Reset(0) in state 1
Trace:          CSftpListOpData::SubcommandResult(0) in state 1
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpListOpData::Send() in state 2
Trace:          CControlSocket::ResetOperation(0)
Trace:          CSftpListOpData::Reset(0) in state 2
Status:         Directory listing of "/home/ubuntu" successful
Trace:          CFileZillaEnginePrivate::ResetOperation(0)
Trace:          CFileZillaEnginePrivate::ResetOperation(0)
Status:         Disconnected from server
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::DoClose(66)
Trace:          CFileZillaEnginePrivate::ResetOperation(0)
Status:         Connecting to 35.181.**.***...
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 0
Trace:          Going to execute /Applications/FileZilla.app/Contents/MacOS//fzsftp
Response:   fzSftp started, protocol_version=8
Trace:          CSftpDeleteOpData::ParseResponse() in state 0
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 2
Command:    keyfile "/Users/****/Desktop/ParisInstance.ppk"
Trace:          CSftpDeleteOpData::ParseResponse() in state 2
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 3
Command:    open "ubuntu@35.181.**.***" 22
Trace:          Connecting to 35.181.**.*** port 22
Trace:          We claim version: SSH-2.0-FileZilla_3.43.0
Trace:          Server version: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
Trace:          Using SSH protocol version 2
Trace:          Doing ECDH key exchange with curve Curve25519 and hash SHA-256
Trace:          Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
Trace:          Host key fingerprint is:
Trace:          ssh-ed25519 256 62:2b:a1:ac:13:74:1a:c5:56:bf:82:74:d0:28:e2:8c HnCtld7UjEMzLCnnbrUUy9EVFmFMHI0fg7QnLBzqbCk=
Trace:          CSftpControlSocket::SetAsyncRequestReply
Command:    Trust new Hostkey: Once
Trace:          Initialised AES-256 GCM client->server encryption
Trace:          Initialised AES256 GCM client->server MAC algorithm (in ETM mode) (required by cipher)
Trace:          Initialised AES-256 GCM server->client encryption
Trace:          Initialised AES256 GCM server->client MAC algorithm (in ETM mode) (required by cipher)
Trace:          Pageant is running. Requesting keys.
Trace:          Pageant has 0 SSH-2 keys
Trace:          Successfully loaded 1 key pair from file
Trace:          Offered public key from "/Users/****/Desktop/ParisInstance.ppk"
Trace:          Server refused our key
Trace:          Disconnected: No supported authentication methods available (server sent: publickey)
Error:          Disconnected: No supported authentication methods available (server sent: publickey)
Trace:          CSftpControlSocket::OnTerminate without error
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::ResetOperation(66)
Trace:          CSftpDeleteOpData::Reset(66) in state 3
Error:          Could not connect to server
Trace:          CFileZillaEnginePrivate::ResetOperation(66)
Status:         Disconnected from server
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::DoClose(66)
Trace:          CFileZillaEnginePrivate::ResetOperation(0)
Status:         Delaying connection for 5 seconds due to previously failed connection attempt...
Status:         Connecting to 35.181.**.***...
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 0
Trace:          Going to execute /Applications/FileZilla.app/Contents/MacOS//fzsftp
Response:   fzSftp started, protocol_version=8
Trace:          CSftpDeleteOpData::ParseResponse() in state 0
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 2
Command:    keyfile "/Users/****/Desktop/ParisInstance.ppk"
Trace:          CSftpDeleteOpData::ParseResponse() in state 2
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 3
Command:    open "ubuntu@35.181.**.***" 22
Trace:          Connecting to 35.181.**.*** port 22
Trace:          We claim version: SSH-2.0-FileZilla_3.43.0
Trace:          Server version: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
Trace:          Using SSH protocol version 2
Trace:          Doing ECDH key exchange with curve Curve25519 and hash SHA-256
Trace:          Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
Trace:          Host key fingerprint is:
Trace:          ssh-ed25519 256 62:2b:a1:ac:13:74:1a:c5:56:bf:82:74:d0:28:e2:8c HnCtld7UjEMzLCnnbrUUy9EVFmFMHI0fg7QnLBzqbCk=
Trace:          CSftpControlSocket::SetAsyncRequestReply
Command:    Trust new Hostkey: Once
Trace:          Initialised AES-256 GCM client->server encryption
Trace:          Initialised AES256 GCM client->server MAC algorithm (in ETM mode) (required by cipher)
Trace:          Initialised AES-256 GCM server->client encryption
Trace:          Initialised AES256 GCM server->client MAC algorithm (in ETM mode) (required by cipher)
Trace:          Pageant is running. Requesting keys.
Trace:          Pageant has 0 SSH-2 keys
Trace:          Successfully loaded 1 key pair from file
Trace:          Offered public key from "/Users/****/Desktop/ParisInstance.ppk"
Trace:          Server refused our key
Trace:          Disconnected: No supported authentication methods available (server sent: publickey)
Error:          Disconnected: No supported authentication methods available (server sent: publickey)
Trace:          CSftpControlSocket::OnTerminate without error
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::ResetOperation(66)
Trace:          CSftpDeleteOpData::Reset(66) in state 3
Error:          Could not connect to server
Trace:          CFileZillaEnginePrivate::ResetOperation(66)
Status:         Disconnected from server
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::DoClose(66)
Trace:          CFileZillaEnginePrivate::ResetOperation(0)
Status:         Delaying connection for 5 seconds due to previously failed connection attempt...
Status:         Connecting to 35.181.**.***...
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 0
Trace:          Going to execute /Applications/FileZilla.app/Contents/MacOS//fzsftp
Response:   fzSftp started, protocol_version=8
Trace:          CSftpDeleteOpData::ParseResponse() in state 0
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 2
Command:    keyfile "/Users/****/Desktop/ParisInstance.ppk"
Trace:          CSftpDeleteOpData::ParseResponse() in state 2
Trace:          CControlSocket::SendNextCommand()
Trace:          CSftpDeleteOpData::Send() in state 3
Command:    open "ubuntu@35.181.**.***" 22
Trace:          Connecting to 35.181.**.*** port 22
Trace:          We claim version: SSH-2.0-FileZilla_3.43.0
Trace:          Server version: SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.8
Trace:          Using SSH protocol version 2
Trace:          Doing ECDH key exchange with curve Curve25519 and hash SHA-256
Trace:          Server also has ecdsa-sha2-nistp256/ssh-rsa host keys, but we don't know any of them
Trace:          Host key fingerprint is:
Trace:          ssh-ed25519 256 62:2b:a1:ac:13:74:1a:c5:56:bf:82:74:d0:28:e2:8c HnCtld7UjEMzLCnnbrUUy9EVFmFMHI0fg7QnLBzqbCk=
Trace:          CSftpControlSocket::SetAsyncRequestReply
Command:    Trust new Hostkey: Once
Trace:          Initialised AES-256 GCM client->server encryption
Trace:          Initialised AES256 GCM client->server MAC algorithm (in ETM mode) (required by cipher)
Trace:          Initialised AES-256 GCM server->client encryption
Trace:          Initialised AES256 GCM server->client MAC algorithm (in ETM mode) (required by cipher)
Trace:          Pageant is running. Requesting keys.
Trace:          Pageant has 0 SSH-2 keys
Trace:          Successfully loaded 1 key pair from file
Trace:          Offered public key from "/Users/****/Desktop/ParisInstance.ppk"
Trace:          Server refused our key
Trace:          Disconnected: No supported authentication methods available (server sent: publickey)
Error:          Disconnected: No supported authentication methods available (server sent: publickey)
Trace:          CSftpControlSocket::OnTerminate without error
Trace:          CControlSocket::DoClose(66)
Trace:          CControlSocket::ResetOperation(66)
Trace:          CSftpDeleteOpData::Reset(66) in state 3
Error:          Could not connect to server
Trace:          CFileZillaEnginePrivate::ResetOperation(66)

FileZilla version: 3.43.0 (latest) OS: MacOS Mojave 10.14.5

The connection was successful as you see in Directory listing of "/var/www/html" successful, then I moved a file (from server to my local) and I keep getting the error.

Update 2: Now I can see the problem. FileZilla used svParis.ppk to connect at first, then when I'm trying to move the files, it uses ParisInstance.ppk (the old key I changed).

Why is this happening? Is it because I added the public key to my instance manually (not from AWS console)?

mshjri

Posted 2019-07-29T14:25:43.250

Reputation: 1

I can confirm that FileZilla generally works for this, I've done exactly the same ting. We'll need more detail to help - ssh detailed logs, any FileZilla logs, and FileZilla platform / version - latest is 3.43.0. – Tim – 2019-07-30T18:53:33.453

Now I can see the problem. FileZilla used svParis.ppk to connect at first, then when I'm trying to move the files, it uses ParisInstance.ppk (the old key I changed). But why ? – mshjri – 2019-07-31T08:30:40.657

FileZilla cannot made the file name up. Scan the FileZilla configuration files (filezilla.xml and its companions) for the ParisInstance.ppk. - It should be in ~/.config/filezilla on MacOS (https://forum.filezilla-project.org/viewtopic.php?t=34904)

– Martin Prikryl – 2019-07-31T14:47:54.903

Thank you very much. removing the folder solved it for me. – mshjri – 2019-08-01T07:24:35.547

Answers

0

Solved by removing the ~/.config/fiezilla folder while FileZilla was closed.

Why: Scanning the config folder, showed my old key ParisInstance.ppk was still written into one of the files (filezilla.xml), though sitemanager.xml had the correct key. However, after removing the folder, starting FileZilla, and adding the server connection info again it worked.

mshjri

Posted 2019-07-29T14:25:43.250

Reputation: 1

Where did you find your key in sitemanager.xml? I'm not aware that it's possible to specify a key for a specific site in FileZilla. – Martin Prikryl – 2019-08-02T16:14:30.863

1In the Site Manager window, Using SFTP with logon type "Key file" allows you to specify the key file (file path) and it will be stored in the sitemanager.xml inside <Keyfile> tags. – mshjri – 2019-08-02T18:23:58.467

OK, I see. Then it's obvious how to fix this cleanly, instead of deleting all your FileZilla configuration. – Martin Prikryl – 2019-08-03T14:03:19.610

I had the new key stored in sitemanager.xml, but the problem was that the old key stored in filezilla.xml. Not sure why the old one was there. – mshjri – 2019-08-05T08:18:38.470