cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
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
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

 

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.