Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

TODO: polishThis article provides some resolution steps in case your machine is running but refusing SSH access. This kind of issue can be resolved through the Azure portal directly.

Image Added

...


Table of Contents
stylenone


...


1 - Context

It may happen after restarting or booting an existing virtual machine that your machine refuses SSH access even though Azure indicates that your machine is running. This issue does not necessarily mean that your machine is having troubles and/or is down and may only be due to the main SSH service being not started properly.

If you try to connect to the machine via SSH it is likely that you will see this type of error (note the "-vvv" to be able full verbose mode):

Code Block
ssh -vvv myuser@mymachine
# => ssh_exchange_identification: Connection closed by remote host


If you are using Ruby to connect to the machine - e.g. from the Nex!™ orchestrator - you will likely see errors like:

Code Block
languageruby
Net::SSH::Disconnect: connection closed by remote host


2 - Resolution steps

In order to resolve the problem above you can follow the steps below 

  1. Go to Azure portal
  2. Select the machine you have troubles with
  3. Go to the Reset Password section
  4. Select "Reset Configuration Only" in the dropdown
  5. Wait for the SSH reset to be done
  6. Try to SSH again to the machine

Original referenceIf the above does not work you can try to do a full SSH reset by entering a new SSH key

  1. Go to the Reset Password section
  2. Select Reset SSH Public Key
  3. Enter the new SSH public key for your machine and click save
  4. Wait for the SSH reset to be done
  5. Try to SSH again to the machine

3 - Reference article

Original articlehttps://docs.microsoft.com/en-gb/azure/virtual-machines/linux/troubleshoot-ssh-connection#fix-common-ssh-errors

...