cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

com.jcraft.jsch.JSchException: java.net.UnknownHostException SFTP errors

alex_radu
Product and Topic Expert
Product and Topic Expert
0 Kudos
5,186

We are using a key authentication method/option to connect to a test SFTP server for development.

In our BTP tenant we loaded the private key, as well as the sftp server public key in the known.hosts file.

Everything looks fine, except we are getting this com.jcraft.jsch.JSchException: java.net.UnknownHostException error constantly.

We have managed to connect via FileZilla with no issues using same private key.

We tried using the host name as well as the IP address, with Host Key Verification setting to either "Off" or "Against Tenant", still no luck.

What could be the issue here? It seems this tenant can't resolve the hostname - maybe a DNS issue?

Accepted Solutions (1)

Accepted Solutions (1)

alex_radu
Product and Topic Expert
Product and Topic Expert
0 Kudos

Solved the issue. The SFTP host was not reachable via the Proxy Type = Internet. We had to switch to On-Premise Proxy Type, and give it a proper Location ID. Everything pertaining to the private key (used for authentication) and the server public key required in the known.hosts file on the CI tenant were set up properly from the get go.

Answers (1)

Answers (1)

Yogananda
Product and Topic Expert
Product and Topic Expert
0 Kudos

alex.radu

to solve your issue, you need to upload certificate to Security - Manage Keystore - Add certificate.

How to get certificate ? Go to Security - connectivity test - ssh - you can test it and download certificate

alex_radu
Product and Topic Expert
Product and Topic Expert
0 Kudos

Thanks for replying but we have the certs loaded correctly as far as we know…