0 votes
by (120 points)

Getting "No suitable authentication method is supported. Supported method: keyboard interactive"

I am using rebex.net dll and trying to do sftp using public private key and without password.

Had generated key and kept it on unix server in .ssh/authorized_keys file.

When i am trying to login from my windows machine using generated public/private keys , i am getting above error.

I m able to connect to host but not able to login.
Regex.net.sftp dll v2.0.4086.0.

Any help/ guidance will be helpfull.

Applies to: Rebex SFTP

1 Answer

0 votes
by (147k points)

Make sure the permissions of ~/.ssh and the authorized_keys file are correct. It should only be accessible by the owner:

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys

If the permissions are set properly and it still doesn't work, try logging in using a third party SFTP client (such as WinSCP) to determine whether the issue is at the client or server.

by (120 points)
Had checked permission.
I hv permission 776 (read write ) to both.
Still getting same error.
I am able to connect using putty.

What could be probably issue ??
Is it some permission needs to be given at server end for public private key authentication ?

Currently its working fine with user name and password.

But i hv change it to authenticate based on keys.

Any guidance will be helpfull.
by (120 points)
How to determine what type of authentication server supports ??

Currently i m able login using username and password but getting error when using username and key.
by (147k points)
Permission 766 is too permissive (it allows read by others) and would cause OpenSSH server to ignore your authorized_keys file. It really must only be readable by the owner, which means that permission 600 is required (and 700 for the directory). Check out http://stackoverflow.com/questions/6377009/adding-public-key-to-ssh-authorized-keys-does-not-log-me-in-automatically and https://webcache.googleusercontent.com/search?q=cache:CSVnXnWLp9QJ:https://www.complang.tuwien.ac.at/doc/openssh-server/faq.html#3.14 for more details.
by (147k points)
To determine a list of authentication metods the server supports for a particular user, use Sftp.LogWriter to create a communication log of the Login method (as described at https://www.rebex.net/kb/logging/), and look for the line that lists "Allowed authentication methods". However, be aware that servers are actually allowed to announce authentication methods that don't work for this user (see https://tools.ietf.org/html/rfc4252#section-5.1 for details).
...