Skip to content

Commit b561497

Browse files
authored
[Sftp] Add module help page (#28606)
1 parent 451e763 commit b561497

File tree

10 files changed

+48
-29
lines changed

10 files changed

+48
-29
lines changed

src/Sftp/Sftp/Az.Sftp.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ PrivateData = @{
109109
# ReleaseNotes of this module
110110
ReleaseNotes = '* Initial release of Az.Sftp module providing Azure Storage SFTP support
111111
* Connect-AzSftp: Establish SFTP connections to Azure Storage accounts with multiple authentication modes
112-
* New-AzSftpCertificate: Generate SSH certificates using Azure AD credentials for SFTP authentication
112+
* New-AzSftpCertificate: Generate SSH certificates using Microsoft Entra credentials for SFTP authentication
113113
* Support for automatic certificate generation, certificate-based authentication, and key-based authentication
114114
* Cross-platform support for Windows, Linux, and macOS
115115
* Integration with Azure PowerShell authentication context'

src/Sftp/Sftp/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
## Upcoming Release
2222
* Initial release of Az.Sftp module
23-
* Added `New-AzSftpCertificate` cmdlet for generating SSH certificates using Azure AD credentials
23+
* Added `New-AzSftpCertificate` cmdlet for generating SSH certificates using Microsoft Entra credentials
2424
- Automatic SSH key pair generation
2525
- Certificate generation for existing public keys
2626
- Support for custom certificate paths

src/Sftp/Sftp/Models/PSCertificateInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public class PSCertificateInfo
4747
public DateTime? ValidUntil { get; set; }
4848

4949
/// <summary>
50-
/// Azure AD principal used for certificate generation
50+
/// Microsoft Entra principal used for certificate generation
5151
/// </summary>
5252
public string Principal { get; set; }
5353

src/Sftp/Sftp/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This module provides PowerShell cmdlets for securely connecting to Azure Storage accounts using SFTP (SSH File Transfer Protocol).
33

44
## Overview
5-
Az.Sftp enables you to establish secure SFTP connections to Azure Storage accounts with hierarchical namespace enabled. The module supports multiple authentication modes including automatic Azure AD certificate generation.
5+
Az.Sftp enables you to establish secure SFTP connections to Azure Storage accounts with hierarchical namespace enabled. The module supports multiple authentication modes including automatic Microsoft Entra certificate generation.
66

77
## Requirements
88
- Azure Storage account with SFTP enabled
@@ -20,7 +20,7 @@ Install-Module -Name Az.Sftp
2020
# Connect to Azure
2121
Connect-AzAccount
2222
23-
# Connect to storage account using Azure AD authentication
23+
# Connect to storage account using Microsoft Entra authentication
2424
Connect-AzSftp -StorageAccount "mystorageaccount"
2525
```
2626

src/Sftp/Sftp/SftpCommands/ConnectAzSftpCommand.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class ConnectAzSftpCommand : SftpBaseCmdlet
5252
public int? Port { get; set; }
5353

5454
[Parameter(Mandatory = false, ParameterSetName = DefaultParameterSet, HelpMessage = "Path to SSH certificate file for authentication. If not provided, a certificate will be generated automatically.")]
55-
[Parameter(Mandatory = true, ParameterSetName = CertificateAuthParameterSet, HelpMessage = "Path to SSH certificate file for authentication. Must be generated with New-AzSftpCertificate or compatible Azure AD certificate.")]
55+
[Parameter(Mandatory = true, ParameterSetName = CertificateAuthParameterSet, HelpMessage = "Path to SSH certificate file for authentication. Must be generated with New-AzSftpCertificate or compatible Microsoft Entra certificate.")]
5656
[ValidateNotNullOrEmpty]
5757
public string CertificateFile { get; set; }
5858

@@ -67,7 +67,7 @@ public class ConnectAzSftpCommand : SftpBaseCmdlet
6767
[ValidateNotNullOrEmpty]
6868
public string PublicKeyFile { get; set; }
6969

70-
[Parameter(Mandatory = true, ParameterSetName = LocalUserAuthParameterSet, HelpMessage = "Username for a local user configured on the storage account. When specified, uses local user authentication instead of Azure AD.")]
70+
[Parameter(Mandatory = true, ParameterSetName = LocalUserAuthParameterSet, HelpMessage = "Username for a local user configured on the storage account. When specified, uses local user authentication instead of Microsoft Entra.")]
7171
[ValidateNotNullOrEmpty]
7272
public string LocalUser { get; set; }
7373

@@ -114,10 +114,10 @@ protected override void ProcessRecord()
114114
switch (ParameterSetName)
115115
{
116116
case DefaultParameterSet:
117-
// Azure AD authentication (automatic certificate generation)
117+
// Microsoft Entra authentication (automatic certificate generation)
118118
if (string.IsNullOrEmpty(CertificateFile) && string.IsNullOrEmpty(PublicKeyFile) && string.IsNullOrEmpty(PrivateKeyFile))
119119
{
120-
WriteVerbose("Fully managed mode: No credentials provided, using Azure AD authentication");
120+
WriteVerbose("Fully managed mode: No credentials provided, using Microsoft Entra authentication");
121121
autoGenerateCert = true;
122122
deleteCert = true;
123123
deleteKeys = true;
@@ -132,7 +132,7 @@ protected override void ProcessRecord()
132132
}
133133
else
134134
{
135-
WriteVerbose("Using provided keys for Azure AD certificate generation");
135+
WriteVerbose("Using provided keys for Microsoft Entra certificate generation");
136136
autoGenerateCert = true;
137137
deleteCert = true;
138138
}
@@ -155,7 +155,7 @@ protected override void ProcessRecord()
155155
}
156156

157157
Host.UI.WriteLine(ConsoleColor.Blue, Host.UI.RawUI.BackgroundColor,
158-
autoGenerateCert ? "Generating temporary credentials using Azure AD authentication..."
158+
autoGenerateCert ? "Generating temporary credentials using Microsoft Entra authentication..."
159159
: "Using provided certificate for authentication...");
160160
break;
161161

src/Sftp/Sftp/SftpCommands/NewAzSftpCertificateCommand.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
namespace Microsoft.Azure.PowerShell.Cmdlets.Sftp.SftpCommands
2424
{
2525
/// <summary>
26-
/// Generate SSH certificate for SFTP authentication using Azure AD
26+
/// Generate SSH certificate for SFTP authentication using Microsoft Entra
2727
/// </summary>
2828
[Cmdlet(VerbsCommon.New, "AzSftpCertificate", DefaultParameterSetName = DefaultParameterSet, SupportsShouldProcess = true)]
2929
[OutputType(typeof(PSCertificateInfo))]
@@ -43,12 +43,12 @@ public class NewAzSftpCertificateCommand : SftpBaseCmdlet
4343
[Alias("OutputFile", "o")]
4444
public string CertificatePath { get; set; }
4545

46-
[Parameter(Mandatory = true, ParameterSetName = FromPublicKeyParameterSet, HelpMessage = "Path to existing SSH public key file for which to generate a certificate using Azure AD.")]
46+
[Parameter(Mandatory = true, ParameterSetName = FromPublicKeyParameterSet, HelpMessage = "Path to existing SSH public key file for which to generate a certificate using Microsoft Entra.")]
4747
[ValidateNotNullOrEmpty]
4848
[Alias("p")]
4949
public string PublicKeyFile { get; set; }
5050

51-
[Parameter(Mandatory = true, ParameterSetName = FromPrivateKeyParameterSet, HelpMessage = "Path to existing SSH private key file. The corresponding public key will be used to generate a certificate using Azure AD.")]
51+
[Parameter(Mandatory = true, ParameterSetName = FromPrivateKeyParameterSet, HelpMessage = "Path to existing SSH private key file. The corresponding public key will be used to generate a certificate using Microsoft Entra.")]
5252
[Parameter(Mandatory = false, ParameterSetName = DefaultParameterSet, HelpMessage = "Path to existing SSH private key file. If provided, uses the corresponding public key for certificate generation.")]
5353
[Parameter(Mandatory = false, ParameterSetName = LocalUserParameterSet, HelpMessage = "Path to existing SSH private key file for local user certificate generation.")]
5454
[ValidateNotNullOrEmpty]
@@ -72,7 +72,7 @@ protected override void ProcessRecord()
7272

7373
string target = !string.IsNullOrEmpty(LocalUser)
7474
? $"SSH certificate for local user '{LocalUser}'"
75-
: "SSH certificate for Azure AD authentication";
75+
: "SSH certificate for Microsoft Entra authentication";
7676

7777
if (!ShouldProcess(target,
7878
$"Do you want to create {target}?",
@@ -197,7 +197,7 @@ protected override void ProcessRecord()
197197
// Check for cancellation before authentication
198198
CmdletCancellationToken.ThrowIfCancellationRequested();
199199

200-
// Use different authentication method for local user vs Azure AD
200+
// Use different authentication method for local user vs Microsoft Entra
201201
string certFile;
202202
string username;
203203

@@ -212,7 +212,7 @@ protected override void ProcessRecord()
212212
}
213213
else
214214
{
215-
// Standard Azure AD authentication
215+
// Standard Microsoft Entra authentication
216216
var (cf, un) = FileUtils.GetAndWriteCertificate(
217217
DefaultContext, actualPublicKeyFile, CertificatePath, SshClientFolder, CmdletCancellationToken);
218218
certFile = cf;

src/Sftp/Sftp/UX/Microsoft.Storage/sftp.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"examples": [
3333
{
34-
"description": "Connect to Azure Storage SFTP with automatic Azure AD authentication.",
34+
"description": "Connect to Azure Storage SFTP with automatic Microsoft Entra authentication.",
3535
"parameters": [
3636
{
3737
"name": "-StorageAccount",
@@ -77,7 +77,7 @@
7777
},
7878
{
7979
"name": "New-AzSftpCertificate",
80-
"description": "Generate SSH certificates for Azure Storage SFTP authentication using Azure AD credentials.",
80+
"description": "Generate SSH certificates for Azure Storage SFTP authentication using Microsoft Entra credentials.",
8181
"path": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{certificatePath}",
8282
"help": {
8383
"learnMore": {

src/Sftp/Sftp/help/Az.Sftp.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
Module Name: Az.Sftp
3+
Module Guid: a1832bbb-ec22-4694-9450-cdf6ee642705
4+
Download Help Link: https://learn.microsoft.com/powershell/module/az.sftp
5+
Help Version: 0.0.1.0
6+
Locale: en-US
7+
---
8+
9+
# Az.Sftp Module
10+
## Description
11+
SFTP module for Azure Storage. Provides cmdlets to generate SSH certificates and establish secure SFTP connections to Azure Storage accounts with hierarchical namespace enabled. For more information on Azure Storage SFTP support, please visit: https://learn.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-support
12+
13+
## Az.Sftp Cmdlets
14+
### [Connect-AzSftp](Connect-AzSftp.md)
15+
Starts an interactive SFTP session to an Azure Storage Account.
16+
Users can login using Microsoft Entra accounts, or local user accounts via standard SSH authentication. Use Microsoft Entra account login for the best security and convenience.
17+
18+
### [New-AzSftpCertificate](New-AzSftpCertificate.md)
19+
Generate SSH certificates for SFTP authentication using Microsoft Entra credentials.

src/Sftp/Sftp/help/Connect-AzSftp.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Connect-AzSftp -StorageAccount <String> [-Port <Int32>] -LocalUser <String> [-Pr
4343
## DESCRIPTION
4444
Start interactive SFTP session to an Azure Storage Account.
4545
Users can login using Microsoft Entra issued certificates or using local user credentials. We recommend login using Microsoft Entra issued certificates when possible.
46-
The target storage account must have SFTP enabled and hierarchical namespace (HNS) enabled. For Azure AD authentication, your Azure AD identity must have appropriate RBAC permissions such as Storage Blob Data Contributor or Storage Blob Data Owner.
46+
The target storage account must have SFTP enabled and hierarchical namespace (HNS) enabled. For Microsoft Entra authentication, your Microsoft Entra identity must have appropriate RBAC permissions such as Storage Blob Data Contributor or Storage Blob Data Owner.
4747

4848
## EXAMPLES
4949

@@ -106,7 +106,7 @@ Connect-AzSftp -StorageAccount "mystorageaccount" -PrivateKeyFile "C:\keys\id_rs
106106

107107
### Example 10: Troubleshoot authentication issues
108108
```powershell
109-
# Check Azure AD authentication status
109+
# Check Microsoft Entra authentication status
110110
Get-AzContext
111111
112112
# Test certificate generation explicitly

src/Sftp/Sftp/help/New-AzSftpCertificate.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# New-AzSftpCertificate
99

1010
## SYNOPSIS
11-
Generate SSH certificates for SFTP authentication using Azure AD credentials.
11+
Generate SSH certificates for SFTP authentication using Microsoft Entra credentials.
1212

1313
## SYNTAX
1414

@@ -37,19 +37,19 @@ New-AzSftpCertificate [-CertificatePath <String>] -LocalUser <String> [-PrivateK
3737
```
3838

3939
## DESCRIPTION
40-
The New-AzSftpCertificate cmdlet generates SSH certificates for SFTP authentication using your current Azure AD credentials. This cmdlet provides the same authentication methods and parameter sets as the Az.Ssh module, ensuring consistency across Azure PowerShell modules.
40+
The New-AzSftpCertificate cmdlet generates SSH certificates for SFTP authentication using your current Microsoft Entra credentials. This cmdlet provides the same authentication methods and parameter sets as the Az.Ssh module, ensuring consistency across Azure PowerShell modules.
4141

4242
The cmdlet supports four authentication modes that align with the SSH module:
4343

44-
**Default Mode (Azure AD Authentication)**: When no specific key files are provided, the cmdlet automatically generates a new SSH key pair and creates a certificate signed by Azure AD's trusted CA. This is the simplest approach for getting started with SFTP authentication.
44+
**Default Mode (Microsoft Entra Authentication)**: When no specific key files are provided, the cmdlet automatically generates a new SSH key pair and creates a certificate signed by Microsoft Entra's trusted CA. This is the simplest approach for getting started with SFTP authentication.
4545

46-
**FromPublicKey Mode**: When a public key file is provided, the cmdlet generates a certificate for that specific key using Azure AD credentials. This is useful when you already have SSH public keys and want to use them for Azure Storage SFTP access.
46+
**FromPublicKey Mode**: When a public key file is provided, the cmdlet generates a certificate for that specific key using Microsoft Entra credentials. This is useful when you already have SSH public keys and want to use them for Azure Storage SFTP access.
4747

48-
**FromPrivateKey Mode**: When a private key file is provided, the cmdlet generates the corresponding public key and creates a certificate using Azure AD credentials. This is helpful when you have existing private keys and want to create certificates for them.
48+
**FromPrivateKey Mode**: When a private key file is provided, the cmdlet generates the corresponding public key and creates a certificate using Microsoft Entra credentials. This is helpful when you have existing private keys and want to create certificates for them.
4949

5050
**LocalUser Mode**: When a local user is specified, the cmdlet generates a certificate suitable for local user authentication on storage accounts. This can be combined with existing private keys or generate new ones, matching the SSH module's local user certificate capabilities.
5151

52-
The generated certificates are typically valid for 1 hour and can be used with any SFTP client that supports SSH certificate authentication. The certificates are signed by Azure AD's trusted CA and will be accepted by Azure Storage accounts where your Azure AD identity has appropriate permissions.
52+
The generated certificates are typically valid for 1 hour and can be used with any SFTP client that supports SSH certificate authentication. The certificates are signed by Microsoft Entra's trusted CA and will be accepted by Azure Storage accounts where your Microsoft Entra identity has appropriate permissions.
5353

5454
You must be signed in to Azure with an account that has appropriate RBAC permissions (such as Storage Blob Data Contributor or Storage Blob Data Owner) on the target storage accounts.
5555

@@ -60,7 +60,7 @@ You must be signed in to Azure with an account that has appropriate RBAC permiss
6060
New-AzSftpCertificate
6161
```
6262

63-
This command generates a new SSH key pair and creates a certificate signed by Azure AD. The key pair and certificate are saved in the system temp directory with auto-generated filenames. This is the simplest way to get started with SFTP authentication.
63+
This command generates a new SSH key pair and creates a certificate signed by Microsoft Entra. The key pair and certificate are saved in the system temp directory with auto-generated filenames. This is the simplest way to get started with SFTP authentication.
6464

6565
### Example 2: Generate certificate with custom path
6666
```powershell
@@ -74,7 +74,7 @@ This command generates a new SSH key pair and creates a certificate, saving the
7474
New-AzSftpCertificate -PrivateKeyFile "C:\keys\id_rsa" -CertificatePath "C:\certs\id_rsa.cert"
7575
```
7676

77-
This command generates a certificate from an existing SSH private key. The cmdlet will automatically derive the public key from the private key and create a certificate signed by Azure AD. This is useful when you have existing private keys and want to create certificates for them.
77+
This command generates a certificate from an existing SSH private key. The cmdlet will automatically derive the public key from the private key and create a certificate signed by Microsoft Entra. This is useful when you have existing private keys and want to create certificates for them.
7878

7979
### Example 4: Generate certificate from existing public key
8080
```powershell

0 commit comments

Comments
 (0)