cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP - JSchException: Algorithm negotiation fail

MonishKumar
New Contributor

When I tried to read the SFTP (CSV file) in Databricks I'm getting the below error

"JSchException: Algorithm negotiation fail"

Code:
var df = spark.read
.options(Map("header"->"true",
"host"->"20.118.190.30",
"username"->"user",
"password"->"pass",
"fileFormat"->"csv",
"dfsTempPath"-> "/ftp/tmp/",
"sep"->",",
"treatEmptyValuesAsNulls"->"false")).sftp("/home/user/sftp_test/sample_csv.csv");

Databricks Version: 12.2 LTS
Apache Spark : 3.3.2
Scala  : 2.12

Library installed:
com.github.arcizon:spark-filetransfer_2.12:0.3.0
com.jcraft:jsch:0.1.55

1 REPLY 1

User16752239289
Valued Contributor

@MonishKumar Could you provide the entire exception ?

From the one line error message, I suspect this is due to the SSL cipher suites required by the SFTP server is not available on cluster. 

You can run below to get the cipher suites that sftp required:

%sh
sudo apt-get -y install nmap
nmap --script ssl-enum-ciphers -p 22 20.118.190.31

 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group