Created on 04-23-2026 02:22 AM - edited 04-23-2026 02:27 AM
SFTP CLI connects to the server and works fine.
But, from PutSFTP it fails with below error, this is the only logs we are getting from PutSFTP
net.schmizz.sshj.transport.TransportException: Server closed connection during identification exchange
Also, both CLI and NiFi are running on same server
Created 04-28-2026 06:18 AM
Created 04-23-2026 06:56 AM
@nisaar
When you execute the SFTP CLI, are you doing so as the same user that owns the running NiFi process? If not, switch to teh NiFi service user and then try your SFTP CLI command again to see if it is successful or if it ask you to accept the host key for the SFTP target. If you are asked to accept the host key, try running your NiFi putSFTP processor again after you accept the host key on the NiFi service user account.
It does not matter what user is authenticated in NiFi or which user created the dataflow on the NiFi canvas. All components are executed as the NiFi service user.
Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt
Created 04-23-2026 10:59 AM
We have deployed NiFi as docker image on Virtual Machine.
From VM CLI SFTP command connects with root user.
On logging in to docker container using docker exec -it <id> bash,
there is no sftp command available to test.
Thanks You
Created 04-24-2026 08:15 AM
@nisaar
What version of Apache NIFi is being used?
How is your PutSFPT processor configured?
Can you share the complete stack trace from the nifi-app.log?
Matt
Created 04-27-2026 06:33 AM
This is the only log I get under Bulletin Board
net.schmizz.sshj.transport.TransportException: Server closed connection during identification exchange
Thank you!
Created 04-28-2026 06:18 AM
Issue is resolved after the vendor whitelisted the IP's
Thanks