How do I connect by admin acccess(account) in Ubuntu VM?

Ashvani Kumar 21 Reputation points
2022-09-20T09:48:44.59+00:00

Hey, I am having a Ubuntu 16 free linux VM with Azure student pack. I am a having a username and password. Username is "ak". Whenever i want to install packages in my VM via ssh connection. I always have to write sudo in each command. Morover, some applications do not run withount admin account. How to connect admin account via ssh. I usaually connect to my Ubuntu via ssh by the command "ssh ak@[IP]". I want admin access. How to connect with admin account. Plz tell!!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,805 questions
0 comments No comments
{count} votes

Accepted answer
  1. srbhatta-MSFT 8,551 Reputation points Microsoft Employee
    2022-09-20T10:34:16.523+00:00

    Hello @Ashvani Kumar ,
    Welcome to Microsoft QnA.
    Why don't you try sudo su - and it will give you the root shell. You will prompted to enter your user account password.
    Try this and let me know. Hope this helps :)
    (Please feel free to correct me if my understanding of your question is incorrect by tagging me in your response).

    ---------
    If the above information is helpful, please accept as answer.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.