I was looking into using VFS for sftp a file in Java. In the following documentation for setPreferredAuthentications it mentions preferredAuthentications - The authentication order - What are the possible values? Was unable to find an answer on-line
Apache VFS - setPreferredAuthentications - What is the possible values for
1.3k Views Asked by Ed Heal At
2
There are 2 best solutions below
0
On
Mm, that is most likely related to SSH authentication. You might use "publickey,password" to prefer public key authentication as the string parameter in your directive.
Maybe this answer will also give you more clues:
https://serverfault.com/q/986839
and a documentation page for OpenSSH client:
The
setPreferredAuthenticationsis equivalent toSSHconfig optionPreferredAuthentications, it specifies the order in which the client should try authentication methods.Possible values are list of ssh authentication methods:
OpenSSH perspective:
As detailed in OpenSSH Manual:
This allows a client to prefer one method (e.g. keyboard-interactive) over another method (e.g. password).
For example :
gssapi-with-mic,hostbased,publickey,keyboard-interactive,passwordThe available authentication methods of OpenSSH are:
gssapi-with-michostbasedkeyboard-interactivenone(used for access to password-less accounts when Cm PermitEmptyPassword is enabled)passwordpublickeyApache VSF perspective:
The Apache VFS project uses Jsch library as an underlayer sftp provider, you can find the detailed config options of jsch in its api doc here.