Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[resolved] SFTP Connection Error Message

Hey everyone,
I am trying to build a data flow where I get certain files from a folder with an (S)FTP connection.
I am using the tFtpConnection component and in the Basic Setting window, I have already entered the host, port, username and password information. Authentication method is set to "password" and SFTP Support is checked.
When I press F6 and run the job, I immediately get the following error message:
------------------------------------

connecting to socket on port 3654
connected
Exception in component tFTPConnection_1
com.jcraft.jsch.JSchException: connection is closed by foreign host
at com.jcraft.jsch.Session.connect(Session.java:240)
at com.jcraft.jsch.Session.connect(Session.java:154)
at edi_on_nav.cmd_sftp_mget_iftmin_in_prod_0_1.CMD_SFTP_mget_IFTMIN_IN_PROD.tFTPConnection_1Process(CMD_SFTP_mget_IFTMIN_IN_PROD.java:513)
at edi_on_nav.cmd_sftp_mget_iftmin_in_prod_0_1.CMD_SFTP_mget_IFTMIN_IN_PROD.runJobInTOS(CMD_SFTP_mget_IFTMIN_IN_PROD.java:1301)
at edi_on_nav.cmd_sftp_mget_iftmin_in_prod_0_1.CMD_SFTP_mget_IFTMIN_IN_PROD.main(CMD_SFTP_mget_IFTMIN_IN_PROD.java:1166)
the end is near
172 milliseconds
disconnected

-------------------------------------
What exactly does "Exception in component tFTPConnection_1
com.jcraft.jsch.JSchException: connection is closed by foreign host" mean? What should I be checking here? Could it be related to the connection details or am I perhaps skipping a step?
Thanks!
Cihan
Labels (3)
12 Replies
Anonymous
Not applicable
Author

You can also use the tSCPxxx components which actually does the same.
Anonymous
Not applicable
Author

SFTP and SCP are both subsystems of the SSHD daemon (default port 22). If you are receiving a connection closed then there is a firewall or some network device sending a RST packet when attempting to connect to that port. Since you can connect to port 21 (FTP), you should ask the sysadmins if there is a firewall preventing SSH connections to the machine (also check your own firewall configuration).
Anonymous
Not applicable
Author

Hi cihanc83,
Is there any update for your issue?
Best regards
Sabrina