Existe uma solução melhor e mais rápida do que baixar / carregar o VHD. Como mencionado, o problema " foi reconhecido como uma nova linha ausente no arquivo sshd_config! "
0. No entanto, a primeira etapa deve ser diferente, porque senão você poderá perder seu IP atual do Cloud Service, se excluir a última VM nele - e no servidor da Web isso é um problema sério. Então, primeiro, crie uma nova VM na mesma região geográfica da VM com problemas, para que o serviço de nuvem tenha pelo menos uma VM em execução e o seu IP atual seja mantido.
Delete the troubled VM but do not delete the associated disk. (You must delete the troubled VM to free up the lock on the associated disk which we would be using later). Note the name of the associated disk (AD).
Select the new VM -> dashboard -> Attach -> "Attach Disk" (Note that the "Attach Disk" option is available only when the associated disk of the troubled VM has been freed up)
Choose the correct AD name in the popup that opens up.
Now SSH into the new VM and mount AD:
sudo mkdir /tmp/dsk
sudo mount /dev/sdc1 /tmp/dsk
(AD would typically be /dev/sdc1; if it isn't in your case, you can find it out by sudo cat /var/log/syslog | grep scsi and looking for the name preceding the message "Attached SCSI disk")
- sudo nano /tmp/dsk/etc/ssh/sshd_config
In our case, at the end of the file, we had a setting "UsePAM yesClientAliveInterval 180" - clearly a newline had been erroneously removed by the upgrade after "yes"! So we inserted the newline, saved the file and followed the steps below once sshd_config had been restored.
(You may also want to do a diff between /tmp/dsk/etc/ssh/ssh_config and /etc/ssh/sshd_config to see if any other configurations are off)
Back to the Azure dashboard: Select the new VM -> dashboard -> Detach Disk and detach AD
Fire up a new VM similar to the troubled VM: + New -> Compute -> Virtual Machine -> From Gallery -> My Disks -> AD (AD should show up here)
That's it - hope SSH works now!
Resposta da fonte na parte inferior: link