Azure Storage Account SFTP is enabled but I am not able to connect to it. It is giving timeout error.

Rajesh Govindarajan 15 Reputation points
2023-04-29T04:54:19.8966667+00:00

I created a storage account, enabled SFTP, and created a local user. But I am not able to connect to it from a command prompt. I am getting the following error.

Connection timed out. Connection closed.

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
3,091 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sumarigo-MSFT 45,776 Reputation points Microsoft Employee
    2023-04-29T07:35:27.1333333+00:00

    @Rajesh Govindarajan Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    It could be intermittently issue, please try again, If the issue occurs, please share the screenshot

    There's a 2-minute time out for idle or inactive connections. OpenSSH will appear to stop responding and then disconnect. Some clients reconnect automatically.

    Limitations and known issues with SSH File Transfer Protocol (SFTP) support for Azure Blob Storage

    This article provided the steps to Connect to Azure Blob Storage by using the SSH File Transfer Protocol (SFTP)

    Verify that SFTP is enabled on your Azure Storage Account. You can do this by checking the settings of the storage account in the Azure portal.

    Ensure that you are using the correct SFTP credentials, including the username and password. You can also try generating a new set of credentials and see if that resolves the issue.

    Check that your firewall rules are properly configured to allow incoming and outgoing traffic on the SFTP port (typically port 22). You may need to add an exception to your firewall to allow traffic from your IP address to the storage account.

    Check that your network connection is stable and that you are not experiencing any disruptions or outages. You can also try connecting from a different network or using a VPN to see if the issue persists.

    Try connecting to your Azure Storage Account using a different SFTP client or tool. This can help isolate whether the issue is with the SFTP client you are using or with the storage account itself.

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


  2. Amrinder Singh 5,155 Reputation points Microsoft Employee
    2024-03-08T04:44:07.71+00:00

    Hi - Thanks for reaching out. We can follow below checks for isolation:

    1: In order to test the connectivity, you can start by connecting via PS or using WINSCP to see if you are able to connect via that. Please note that port 22 should be open in order to connect to Azure Storage over SFTP. If this works, you are connected to SFTP Storage.

    2: In case you are working with some VPN or proxy, you need to verify that the port 22 is not getting blocked on that layer. If after enabling any of this option, you face issue with connectivity with the above suggested options, you might need to again verify if you are able to connect to endpoint over port 22.

    1. In case you are able to connect to storage over SFTP when enabling access from all the networks however when trying to connect from selected networks you are facing issue then it is quite possible that the IP hitting the storage might not be the one which is whitelisted. In that scenario, try enabling diagnostic logging to see what is the IP hitting the storage.

    You can also check for the below blog as well:

    https://techcommunity.microsoft.com/t5/azure-paas-blog/troubleshooting-connectivity-to-azure-storage-over-sftp-via/ba-p/3990625

    Please let us know if you have any further queries. I’m happy to assist you further.


    Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.