Skip to Content
0
Dec 21, 2022 at 10:22 PM

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

1586 Views Last edit Dec 22, 2022 at 08:16 AM 2 rev

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?