Access Azure Storage Account Container from WinSCP Using SFTP

Accessing Azure Storage Account containers from WinSCP using SFTP provides a secure and efficient way to manage your files. This article will guide you through the steps required to set up and access your Azure Storage Account container using WinSCP.

Prerequisites

Before you begin, ensure you have the following.

  1. Azure Storage Account: An active Azure Storage Account.
  2. WinSCP: WinSCP is installed on your local machine.
  3. SFTP Configuration: SFTP is enabled on your Azure Storage Account.

Step 1. Enable SFTP on Azure Storage Account

  • Sign in to Azure Portal: Go to the Azure Portal and sign in with your credentials.
  • Navigate to Storage Account: Locate your Storage Account from the list of resources.
  • Go to the Settings section and select SFTP.
    SFTP
  • Click on Enable SFTP and save the changes.
     Save

Note. There is an Extra Cost associated with Enabling SFTP in the Azure Storage Account.

Step 2. Create a Local User for SFTP


Add a Local User

  • Click on Add to create a new local user.
  • Provide a Username and configure the Authentication Method (either SSH password or SSH key pair).
     Local User
  • Assign the user to the appropriate containers and set the required permissions (read, write, list) and Home Directory to access in SFTP.
    Home Directory

Note. the Password for SFTP Connection once it's saved.

Step 3. Install and Configure WinSCP


Download and Install WinSCP

Download WinSCP from the official website and install it on your local machine.

Configure WinSCP

  • Open WinSCP and click on New Site.
  • Select SFTP as the file protocol.
  • Enter the Host Name as the SFTP endpoint of your Azure Storage Account (e.g., yourstorageaccountname.blob.core.windows.net).
  • Set the Port Number to 22.
  • Provide the Username and Password or Private Key File based on your authentication method.
    Private Key File
  • Now, you should able to access the container from SFTP using the WinSCP tool.

Troubleshooting

  • Connection Issues: Ensure that the SFTP endpoint is correct and that your firewall settings allow outgoing connections on port 22.
  • Authentication Failures: Verify that the username and authentication method are correctly configured in Azure and WinSCP.

Conclusion

Accessing your Azure Storage Account container from WinSCP using SFTP is a straightforward process that enhances your file management capabilities. By following these steps, you can securely connect to your Azure Storage and efficiently manage your files.

For more detailed information and troubleshooting tips, refer to the official Azure Storage documentation.