Skip to content

Commit 6c2ad7a

Browse files
Merge pull request #314306 from DevanshG1/personal/degoswami/docupdates
Resolving commands
2 parents a24b40f + 4c7c6d3 commit 6c2ad7a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

articles/storage/blobs/secure-file-transfer-protocol-support-entra-id-based-access.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ Generate the OpenSSH certificate with the Azure CLI [az sftp](/cli/azure/sftp) c
7070

7171
```azurecli
7272
az login
73-
az sftp cert --file /my_cert.pub
73+
az sftp cert --file ./my_cert.pub
7474
```
7575
For security reasons, the certificate is valid for only 65 minutes. After it expires, you need to rerun the command to get a new certificate.
7676

@@ -96,7 +96,7 @@ Use the following command to generate the SSH certificate with the generated key
9696

9797
```azurecli
9898
az login
99-
az sftp cert --public-key-file /id_rsa.pub --file /my_cert.pub
99+
az sftp cert --public-key-file ./id_rsa.pub --file ./my_cert.pub
100100
```
101101

102102
If you're using a service principal, you can sign in by using either a client secret or a certificate:
@@ -116,7 +116,7 @@ az login --service-principal -u <application_id_or_client_id> -p <secret_value>
116116
After authentication, run the same command to download the certificate:
117117

118118
```azurecli
119-
az sftp cert --public-key-file /id_rsa.pub --file /my_cert.pub
119+
az sftp cert --public-key-file ./id_rsa.pub --file ./my_cert.pub
120120
```
121121

122122
#### [Azure PowerShell](#tab/azurepowershell)
@@ -130,13 +130,13 @@ Connect-AzAccount
130130
Generate the OpenSSH certificate by using [PowerShell Az.Sftp](https://www.powershellgallery.com/packages/Az.Sftp/0.1.0) as shown in the following example:
131131

132132
```powershell
133-
New-AzSftpCertificate -CertificatePath "\my_cert.cert"
133+
New-AzSftpCertificate -CertificatePath ".\my_cert.pub"
134134
```
135135

136136
Optionally, use the following command to generate the OpenSSH certificate by using your SSH keys:
137137

138138
```powershell
139-
New-AzSftpCertificate -PublicKeyFile "\id_rsa.pub" -CertificatePath "\my_cert.cert"
139+
New-AzSftpCertificate -PublicKeyFile ".\id_rsa.pub" -CertificatePath ".\my_cert.pub"
140140
```
141141

142142
Learn more about the PowerShell module [here](/powershell/module/az.sftp/).
@@ -278,7 +278,7 @@ SFTP clients such as WinSCP and PuTTY support OpenSSH-based authentication. The
278278
Use the following command to connect by using the OpenSSH certificate obtained in the previous steps:
279279

280280
```azurecli
281-
az sftp connect --storage-account <<account_name>> --certificate-file /my_cert.pub
281+
az sftp connect --storage-account <<account_name>> --certificate-file ./my_cert.pub --private-key-file ./id_rsa
282282
```
283283

284284
Additionally, you can get the OpenSSH certificate and connect to SFTP by using a single command as follows:
@@ -295,7 +295,7 @@ For more information about the commands, see [here](/cli/azure/sftp).
295295
Use the following command to connect by using the OpenSSH certificate obtained in the previous steps:
296296

297297
```powershell
298-
Connect-AzSftp -StorageAccount "<<account_name>>" -CertificateFile "/my_cert.pub"
298+
Connect-AzSftp -StorageAccount "<<account_name>>" -CertificateFile ".\my_cert.pub" -PrivateKeyFile ".\id_rsa"
299299
```
300300

301301
Additionally, you can get the OpenSSH certificate and connect to SFTP by using a single command as follows:

0 commit comments

Comments
 (0)