Skip to content

Latest commit

 

History

History
116 lines (74 loc) · 6.12 KB

File metadata and controls

116 lines (74 loc) · 6.12 KB
title Enable or disable SFTP support in Azure Blob Storage
titleSuffix Azure Storage
description Learn how to enable SSH File Transfer Protocol (SFTP) support for Azure Blob Storage so that you can directly connect to your Azure Storage account by using an SFTP client.
author normesta
ms.service azure-blob-storage
ms.topic how-to
ms.date 04/30/2024
ms.author normesta
ms.custom
sfi-image-nochange

Enable or disable SSH File Transfer Protocol (SFTP) support in Azure Blob Storage

This article shows you how to enable or disable support for SFTP so that you can securely connect to the Blob Storage endpoint of your Azure Storage account by using an SFTP client.

To learn more about SFTP support for Azure Blob Storage, see SSH File Transfer Protocol (SFTP) in Azure Blob Storage.

Prerequisites

Enable SFTP support

This section shows you how to enable SFTP support for an existing storage account. To view an Azure Resource Manager template that enables SFTP support as part of creating the account, see Create an Azure Storage Account and Blob Container accessible using SFTP protocol on Azure. To view the Local User REST APIs and .NET references, see Local Users and LocalUser Class.

  1. In the Azure portal, navigate to your storage account.

  2. Under Settings, select SFTP.

    [!NOTE] This option appears only if the hierarchical namespace feature of the account has been enabled. To enable the hierarchical namespace feature, see Upgrade Azure Blob Storage with Azure Data Lake Storage capabilities.

  3. Select Enable SFTP.

    [!div class="mx-imgBorder"] Enable SFTP button

    [!NOTE] If no local users appear in the SFTP configuration page, you'll need to add at least one of them. To add local users, see the next section.

To enable SFTP support, call the Set-AzStorageAccount command and set the -EnableSftp parameter to true. Remember to replace the values in angle brackets with your own values:

$resourceGroupName = "<resource-group>"
$storageAccountName = "<storage-account>"

Set-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName -EnableSftp $true 

To enable SFTP support, call the az storage account update command and set the --enable-sftp parameter to true. Remember to replace the values in angle brackets with your own values:

az storage account update -g <resource-group> -n <storage-account> --enable-sftp=true

Disable SFTP support

This section shows you how to disable SFTP support for an existing storage account. Because SFTP support incurs an hourly cost, consider disabling SFTP support when clients aren't actively using SFTP to transfer data.

  1. In the Azure portal, navigate to your storage account.

  2. Under Settings, select SFTP.

  3. Select Disable SFTP.

    [!div class="mx-imgBorder"] Screenshot of the disable SFTP button.

To disable SFTP support, call the Set-AzStorageAccount command and set the -EnableSftp parameter to false. Remember to replace the values in angle brackets with your own values:

$resourceGroupName = "<resource-group>"
$storageAccountName = "<storage-account>"

Set-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $storageAccountName -EnableSftp $false 

To disable SFTP support, call the az storage account update command and set the --enable-sftp parameter to false. Remember to replace the values in angle brackets with your own values:

az storage account update -g <resource-group> -n <storage-account> --enable-sftp=false

Next steps

Related content