I have problems connecting via SSh to my virtual machine

NoBody 1 Reputation point
2022-09-04T08:52:46.9+00:00

I have problems connecting via SSh to my virtual machine,

The programs included with the Ubuntu system are free software;  
the exact distribution terms for each program are described in the  
individual files in /usr/share/doc/*/copyright.  
  
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by  
applicable law.  
  
Last login: Sun Sep  4 08:07:16 2022 from 191.xxxx  
This account is currently not available.  
Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,015 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Prrudram-MSFT 28,201 Reputation points Moderator
    2022-09-12T18:57:59.26+00:00

    Hello @NoBody ,

    Thank you for reaching out to the Microsoft Q&A platform. Happy to answer your question.

    What does “This account is currently not available” error mean?
    “This account is currently not available” error means what is says. The account you are trying to login with is currently not available because there is no valid shell set for this user.

    In general, for Linux VMs with root account, you can fix this error by looking into 240158-image.png(use root account) file and see the shell which is set for the desired user.

    240169-image.png

    In case of azure VM, by default, the root user is disabled on Linux virtual machines in Azure. Users can run commands with elevated privileges by using the sudo command. However, the experience may vary depending on how the system was provisioned. Hence in this situation you will not have the option to use root account. So, I would suggest following this TSG from azure VM docs to try other approaches to connect to the VM and fix the issue with the account you are trying to login with. Doc ref: https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection

    Or you can use the PowerShell method and use "az vm user update" to Update a Linux user account. If username does not exist, a new user will be created.
    Ref: https://learn.microsoft.com/en-us/cli/azure/vm/user?view=azure-cli-latest

    --please don't forget to upvote and accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.