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
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
@@ -185,11 +185,11 @@ az vm user update --resource-group myResourceGroup --name myVM \
185
185
--username myUsername --password myPassword
186
186
```
187
187
188
-
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:
188
+
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:
189
189
190
190
```azurecli
191
191
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:
218
+
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:
219
219
220
220
```json
221
221
{
@@ -238,33 +238,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.
244
-
245
-
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:
246
-
247
-
```azurecli
248
-
azure vm reset-access --resource-group myResourceGroup --name myVM \
249
-
--reset-ssh
250
-
```
251
-
252
-
### Reset SSH credentials for a user
253
-
254
-
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:
255
-
256
-
```azurecli
257
-
azure vm reset-access --resource-group myResourceGroup --name myVM \
258
-
--user-name myUsername --password myPassword
259
-
```
260
-
261
-
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:
262
-
263
-
```azurecli
264
-
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