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