0

I'm trying to SFTP to a server with a username and password supplied to me by a client but I keep getting Disconnected: No supported authentication methods available (server sent: publickey). I'm on Ubuntu 13.10 and I have tried using the Filezilla gui as well as sftp -vv user@host and lftp -u user sftp://host in the terminal.

Here's the output I get from Filezilla in Debug:Verbose mode:

Response:   fzSftp started
Trace:  CSftpControlSocket::ConnectParseResponse(fzSftp started)
Trace:  CSftpControlSocket::SendNextCommand()
Trace:  CSftpControlSocket::ConnectSend()
Command:    open "user@host" 22
Trace:  Server version: SSH-2.0-CoreFTP-0.3.1
Trace:  Using SSH protocol version 2
Trace:  We claim version: SSH-2.0-PuTTY_Local:_Sep_14_2013_01:12:43
Trace:  Using Diffie-Hellman with standard group "group14"
Trace:  Doing Diffie-Hellman key exchange with hash SHA-1
Trace:  Host key fingerprint is:
Trace:  ssh-rsa 1024 b1:ac:c5:b6:d2:b8:d3:ef:fc:d2:b3:d8:06:2c:d2:25
Trace:  Initialised AES-256 SDCTR client->server encryption
Trace:  Initialised HMAC-SHA1 client->server MAC algorithm
Trace:  Initialised AES-256 SDCTR server->client encryption
Trace:  Initialised HMAC-SHA1 server->client MAC algorithm
Trace:  Pageant is running. Requesting keys.
Trace:  Pageant has 1 SSH-2 keys
Trace:  Trying Pageant key #0
Trace:  Sending Pageant's response
Trace:  Access denied
Trace:  Disconnected: No supported authentication methods available (server sent: publickey)
Error:  Disconnected: No supported authentication methods available (server sent: publickey)
Trace:  CSftpControlSocket::ResetOperation(66)
Trace:  CControlSocket::ResetOperation(66)
Error:  Could not connect to server

sftp -vv output is similar. It seems that Pageant is offering my public key before the password (which is normal) but then does not continue to password authentication. Is there a way to force password authentication first (ie bypass Pageant altogether)? I have to be able to bash script operations over this connection so using the sftp or lftp commands will be necessary. Is there a flag I can set to accomplish this? I looked in the man pages but didn't find what I was looking for.

There is always the chance that something is misconfigured on the client's server but since the client is able to login from this account no problem I suspect the problem is somewhere on my side.

UPDATE

The client is able to log into the server with this account using Filezilla on windows, ruling out the possibility that their server is configure to only allow public key auth. This is a larger company with an IT department that have many such accounts so it is reasonably safe to assume they have done this before. Here is the output from their Debug:Verbose in Filezilla:

 Status:                   Connecting to host:22...

Trace:                     Going to execute "C:\Program Files\FileZilla FTP Client\fzsftp.exe"

Response:             fzSftp started

Trace:                     CSftpControlSocket::ConnectParseResponse(fzSftp started)

Trace:                     CSftpControlSocket::SendNextCommand()

Trace:                     CSftpControlSocket::ConnectSend()

Command:             open "user@host" 22

Trace:                     Looking up host "host"

Trace:                     Connecting to xxx.xxx.xxx.xxx port 22

Trace:                     Server version: SSH-2.0-CoreFTP-0.3.1

Trace:                     Using SSH protocol version 2

Trace:                     We claim version: SSH-2.0-PuTTY_Local:_Jun_15_2008_14:47:43

Trace:                     Using Diffie-Hellman with standard group "group14"

Trace:                     Doing Diffie-Hellman key exchange with hash SHA-1

Trace:                     Host key fingerprint is:

Trace:                     ssh-rsa 1024 b1:ac:c5:b6:d2:b8:d3:ef:fc:d2:b3:d8:06:2c:d2:25

Trace:                     Initialised AES-256 SDCTR client->server encryption

Trace:                     Initialised HMAC-SHA1 client->server MAC algorithm

Trace:                     Initialised AES-256 SDCTR server->client encryption

Trace:                     Initialised HMAC-SHA1 server->client MAC algorithm

Command:             Pass: ********

Trace:                     Sent password

Trace:                     Access granted

Trace:                     Opened channel for session

Trace:                     Started a shell/command

Status:                   Connected to host

Trace:                     CSftpControlSocket::ConnectParseResponse()

Trace:                     CSftpControlSocket::ResetOperation(0)

Trace:                     CControlSocket::ResetOperation(0)

Status:                   Retrieving directory listing...

Trace:                     CSftpControlSocket::SendNextCommand()

Trace:                     CSftpControlSocket::ChangeDirSend()

Command:             pwd

Response:             Current directory is: "/"
2

The server is configured to only allow publickey authentication, not passwords. You can see this where it says:

Trace:  Disconnected: No supported authentication methods available (server sent: publickey)
Error:  Disconnected: No supported authentication methods available (server sent: publickey)
| improve this answer | |
  • I agree, that's what it looks like to me too. The problem for is that the client is able to log in with the password with Filezilla. They sent me their Debug:Verbose output from their successful login. I have updated the question with this information. – eljaydub Mar 20 '14 at 11:23
  • I'd still think the problem is with the server configuration. See if they'll allow you to view the sshd config file. It's quite easy to configure sshd to allow passwords for some IP addresses but require a key for others. – yoonix Mar 20 '14 at 19:03
  • I ended up just convincing the client to let me use public keys so everything is working now. Interestingly I tried to log in using the password with filezilla from a windows 7 virtual machine and it worked fine. – eljaydub Mar 26 '14 at 8:13
2

Might be a late answer, but for the poor souls that will end up here like me.

What is probably going on is that Filezilla use the env variable SSH_AUTH_SOCK to access the available ssh keys.

On my machine, if I run echo $SSH_AUTH_SOCK in a terminal, I get something along the lines of '/run/user/1000/keyring/ssh'

To prevent Filezilla from finding the ssh keys that are in your ssh agent, you can empty that environmental variable by doing so export SSH_AUTH_SOCK="". Now if you start Filezilla in this terminal, it won't be able to access the ssh keys from your ssh agent, and it will use the password of the connection as configured.

| improve this answer | |

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.