Share via

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.

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.

Microsoft Security | Microsoft Entra | Microsoft Entra ID

1 answer

Sort by: Most helpful
  1. Manu Philip 20,651 Reputation points MVP Volunteer Moderator
    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

    Was this answer helpful?


Your answer

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