Support Questions

Find answers, ask questions, and share your expertise
Announcements
We’ve updated our product names and community labels - click here for full details

SFTP CLI works but PutSFTP fails

avatar
Contributor

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

 

1 ACCEPTED SOLUTION

avatar
Contributor

Issue is resolved after the vendor whitelisted the IP's

Thanks

 

View solution in original post

5 REPLIES 5

avatar
Master Mentor

@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




avatar
Contributor

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

 

 

avatar
Master Mentor

@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

avatar
Contributor

@MattWho 

Screenshot 2026-04-27 at 6.57.40 PM.png

nisaar_3-1777296701620.png

nisaar_2-1777296641858.png

nisaar_1-1777296617035.png

nisaar_0-1777296524688.png

 

This is the only log I get under Bulletin Board

net.schmizz.sshj.transport.TransportException: Server closed connection during identification exchange

Thank you!

 

avatar
Contributor

Issue is resolved after the vendor whitelisted the IP's

Thanks