Class SftpKeyAuthentication

java.lang.Object
com.adaptris.core.ftp.SftpKeyAuthentication
All Implemented Interfaces:
SftpAuthenticationProvider

public class SftpKeyAuthentication extends Object implements SftpAuthenticationProvider
SftpAuthenticationProvider using keys.

It has the following behaviour :

  • If the private key is not accepted by the target server, then an exception will be thrown.
  • Multiple private keys are supported, provided you specify a ConfigBuilder implementation that allows it.
  • Specifying the username+password in the destination (e.g. sftp://lchan:myPassword@1.2.3.4:22//opt/sftp), will override the username used to login but no other credentials. The only valid authentication is via the specified private key.
  • The private key and known_hosts file are expected to be in OpenSSH format

In the adapter configuration file this class is aliased as sftp-key-authentication which is the preferred alternative to the fully qualified classname when building your configuration.