You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated commands and descriptions for resetting SSH keys and credentials. Removed redundant sections and clarified usage of az vm user update. Removed obsolete command.
Copy file name to clipboardExpand all lines: support/azure/virtual-machines/linux/troubleshoot-ssh-connection.md
+5-32Lines changed: 5 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -183,11 +183,11 @@ az vm user update --resource-group myResourceGroup --name myVM \
183
183
--username myUsername --password myPassword
184
184
```
185
185
186
-
If using SSH key authentication, you can reset the SSH key for a given user. The following example uses **az vm access set-linux-user** to update the SSH key stored in `~/.ssh/id_rsa.pub` for the user named `myUsername`, on the VM named `myVM` in `myResourceGroup`. Use your own values as follows:
186
+
If using SSH key authentication, you can reset the SSH key for a given user. The following example uses **az vm user update** to update the SSH key stored in `~/.ssh/id_rsa.pub` for the user named `myUsername`, on the VM named `myVM` in `myResourceGroup`. Use your own values as follows:
187
187
188
188
```azurecli
189
189
az vm user update --resource-group myResourceGroup --name myVM \
If SSHD appears to function correctly, you can reset the credentials for a giver user. To reset the password for a user, create a file named `settings.json`. The following example resets the credentials for `myUsername` to the value specified in `myPassword`. Enter the following lines into your `settings.json` file, using your own values:
216
+
If SSHD appears to function correctly, you can reset the credentials for a given user. To reset the password for a user, create a file named `settings.json`. The following example resets the credentials for `myUsername` to the value specified in `myPassword`. Enter the following lines into your `settings.json` file, using your own values:
217
217
218
218
```json
219
219
{
@@ -236,33 +236,6 @@ az vm extension set --resource-group philmea --vm-name Ubuntu \
The SSHD configuration itself may be misconfigured or the service encountered an error. You can reset SSHD to make sure the SSH configuration itself is valid. Resetting SSHD should be the first troubleshooting step you take.
242
-
243
-
The following example resets SSHD on a VM named `myVM` in the resource group named `myResourceGroup`. Use your own VM and resource group names as follows:
244
-
245
-
```azurecli
246
-
azure vm reset-access --resource-group myResourceGroup --name myVM \
247
-
--reset-ssh
248
-
```
249
-
250
-
### Reset SSH credentials for a user
251
-
252
-
If SSHD appears to function correctly, you can reset the password for a giver user. The following example resets the credentials for `myUsername` to the value specified in `myPassword`, on the VM named `myVM` in `myResourceGroup`. Use your own values as follows:
253
-
254
-
```azurecli
255
-
azure vm reset-access --resource-group myResourceGroup --name myVM \
256
-
--user-name myUsername --password myPassword
257
-
```
258
-
259
-
If using SSH key authentication, you can reset the SSH key for a given user. The following example updates the SSH key stored in `~/.ssh/id_rsa.pub` for the user named `myUsername`, on the VM named `myVM` in `myResourceGroup`. Use your own values as follows:
260
-
261
-
```azurecli
262
-
azure vm reset-access --resource-group myResourceGroup --name myVM \
If you have reset the SSH configuration and user credentials, or encountered an error in doing so, you can try restarting the VM to address underlying compute issues.
0 commit comments