Skip to content

Commit 23829d0

Browse files
authored
[SFTP] Specify local user PK is base64 encoded (#22456)
1 parent 42bbe9f commit 23829d0

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/Storage/Storage.Management/help/Set-AzStorageLocalUser.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ To run this cmdlet, the storage account must has already set EnableLocalUser as
3939

4040

4141
```
42-
PS C:\> $sshkey1 = New-AzStorageLocalUserSshPublicKey -Key "ssh-rsa keykeykeykeykey=" -Description "sshpulickey name1"
42+
PS C:\> $sshkey1 = New-AzStorageLocalUserSshPublicKey -Key "ssh-rsa base64encodedkey=" -Description "sshpublickey name1"
4343
4444
PS C:\> $permissionScope1 = New-AzStorageLocalUserPermissionScope -Permission rw -Service blob -ResourceName container1
4545
@@ -57,7 +57,7 @@ PS C:\> $localuser.SshAuthorizedKeys
5757
5858
Description Key
5959
----------- ---
60-
sshpulickey name1 ssh-rsa keykeykeykeykey=
60+
sshpublickey name1 ssh-rsa base64encodedkey=
6161
6262
PS C:\> $localuser.PermissionScopes
6363
@@ -66,20 +66,21 @@ Permissions Service ResourceName
6666
rw blob container1
6767
```
6868

69-
The first 2 commands create 2 local objects that will be used in create or update local user.
70-
The third command creates or updates the local user.
71-
The following commands show the local user properties.
69+
The first command creates a local SSH public key object. Note that the key follows the format of `<algorithm> <data>` where data is the base64 encoded contents of the public key.
70+
The second command creates a local permission scope object that defines the container level access for the local user.
71+
The third command creates or updates the local user, using the local objects from the first 2 commands.
72+
The final command shows the local user properties.
7273

7374
### Example 2: Create or update a local user by input permission scope and ssh key with json
7475
```powershell
7576
Set-AzStorageLocalUser -ResourceGroupName "myresourcegroup" -AccountName "mystorageaccount" -UserName testuser1 -HomeDirectory "/" -HasSharedKey $true -HasSshKey $true -HasSshPassword $true `
7677
-SshAuthorizedKey (@{
7778
Description="sshpulickey name1";
78-
Key="ssh-rsa keykeykeykeykey=";
79+
Key="ssh-rsa base64encodedkey=";
7980
},
8081
@{
8182
Description="sshpulickey name2";
82-
Key="ssh-rsa keykeykeykeykew=";
83+
Key="ssh-rsa otherbase64encodedkey=";
8384
}) `
8485
-PermissionScope (@{
8586
Permissions="rw";

0 commit comments

Comments
 (0)