= SFTP Component
:doctitle: SFTP
:shortname: sftp
:artifactid: camel-ftp
:description: Upload and download files to/from SFTP servers.
:since: 1.1
:supportlevel: Stable
:tabs-sync-option:
:component-header: Both producer and consumer are supported
//Manually maintained attributes
:camel-spring-boot-name: ftp

*Since Camel {since}*

*{component-header}*

This component provides access to remote file systems over the SFTP protocol.

Maven users will need to add the following dependency to their `pom.xml`
for this component:

[source,xml]
-----------------------------------------------------------------------
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-ftp</artifactId>
    <version>x.x.x</version>
    <!-- use the same version as your Camel core version -->
</dependency>
-----------------------------------------------------------------------

// component-configure options: START

// component-configure options: END

// component options: START
include::partial$component-configure-options.adoc[]
include::partial$component-endpoint-options.adoc[]
// component options: END

// endpoint options: START

// endpoint options: END
// component headers: START
include::partial$component-endpoint-headers.adoc[]
// component headers: END

== Usage

=== Restoring Deprecated Key Types and Algorithms

As of Camel 3.17.0, key types and algorithms that use SHA1 have been deprecated. These can be restored, if necessary, by setting JSch configuration directly. E.g.:

[source,java]
----
JSch.setConfig("server_host_key",  JSch.getConfig("server_host_key") + ",ssh-rsa");
JSch.setConfig("PubkeyAcceptedAlgorithms", JSch.getConfig("PubkeyAcceptedAlgorithms") + ",ssh-rsa");
JSch.setConfig("kex", JSch.getConfig("kex") + ",diffie-hellman-group1-sha1,diffie-hellman-group14-sha1");
----

Note that the key types and algorithms your server supports may differ than the above example. You can use the following
command to inspect your server's configuration:

----
ssh -vvv <server_address>
----

As of Camel 3.18.1, these values can also be set on SFTP endpoints by setting the corresponding URI parameters.

== More Information

For more information, you can look at the xref:ftp-component.adoc[FTP component].


include::spring-boot:partial$starter.adoc[]
