Logging VM Command Line

Kováčik Michal 1 Reputation point
2021-07-26T19:04:14.643+00:00

Hi,

please, I want to ask if is possible to logging command line in VMs or Bastion Host.

For example if any user write command "apt-get update" I want to save log about it or if any user will connect from bastion to another resource I want to save log about it too.

Thank you.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,112 questions
Azure Bastion
Azure Bastion
An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.
241 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,451 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Manu Philip 16,971 Reputation points MVP
    2021-07-26T19:12:01.207+00:00

    Logs are available only in connected VM and can't be available in bastion host from where the VM has been connected. Just run history in shell to see the previous commands ran in a VM