Forum Discussion
Failed to copy data from SFTP
I want to "Copy Data" in the data pipeline to pull CSV files from SFTP. The server is xxx.blob.core.windows.net.
My SFTP connection in "Manage Connections and Gateways" shows Online, so I think the username and password are correct.
Even after creating a private endpoint for the Azure Blob Storage, I’m still getting the error “The connection was closed by the server.”
Is it because the SFTP is blocking data pipeline's access? If so, why would it still happen even after creating a private endpoint? How to solve this issue?
Thank you!
Hi cheryl0316 ,
Thanks for using Microsoft Fabric Community to post your query.
This error typically occurs when the Fabric pipeline runtime cannot reach the SFTP server on port 22. The connection test in Manage Connections only validates the credentials, but the actual Copy activity runs from the managed Fabric environment, and that environment must have direct network access to the SFTP host.
Firewall rules or network restrictions on the SFTP server can prevent the SSH session from being established. When that happens, the server closes the connection and the pipeline reports the error you’re seeing.
You can review the SFTP connector behaviour here:
SFTP connector overview - Microsoft Fabric | Microsoft Learn
Configure SFTP in a copy activity - Microsoft Fabric | Microsoft LearnFor reference, other discussions reporting the same behaviour are here:
Solved: SFTP connection fails in Fabric - Microsoft Fabric Community
Solved: Internal Error Occurred - SFTP Connection - Microsoft Fabric Community
Solved: SFTP connection fails - Microsoft Fabric CommunityUpdating the SFTP network rules to allow access from the Fabric service should resolve the issue.
Hope this helps. Please reach out for further assistance.
Thank you.
2 Replies
- v-veshwara-msftCommunity Support
Hi cheryl0316 ,
Thanks for using Microsoft Fabric Community to post your query.
This error typically occurs when the Fabric pipeline runtime cannot reach the SFTP server on port 22. The connection test in Manage Connections only validates the credentials, but the actual Copy activity runs from the managed Fabric environment, and that environment must have direct network access to the SFTP host.
Firewall rules or network restrictions on the SFTP server can prevent the SSH session from being established. When that happens, the server closes the connection and the pipeline reports the error you’re seeing.
You can review the SFTP connector behaviour here:
SFTP connector overview - Microsoft Fabric | Microsoft Learn
Configure SFTP in a copy activity - Microsoft Fabric | Microsoft LearnFor reference, other discussions reporting the same behaviour are here:
Solved: SFTP connection fails in Fabric - Microsoft Fabric Community
Solved: Internal Error Occurred - SFTP Connection - Microsoft Fabric Community
Solved: SFTP connection fails - Microsoft Fabric CommunityUpdating the SFTP network rules to allow access from the Fabric service should resolve the issue.
Hope this helps. Please reach out for further assistance.
Thank you.- v-veshwara-msftCommunity Support
Hi cheryl0316 ,
Just wanted to check if the response provided was helpful. If further assistance is needed, please reach out.
Thank you.