Browsed by
Month: November 2020

Configuring Ubuntu SSH server to use Hashicorp Vault OTP

Configuring Ubuntu SSH server to use Hashicorp Vault OTP

This post will demonstrate how to configure vault and ssh server in order to use OTP for the login to SSH server. Following diagram depicts the process. After we have initialized and unsealed our vault server we need to enable ssh secrets engine with the following command: vault secrets enable ssh Write role to Vault ssh secrets engine. For the test purposes we will allow all IPs Vault write ssh/roles/admin key_type=otp default_user=vaultuser cidr_list=0.0.0.0/0,0.0.0.0/0 Now we need to configure login to…

Read More Read More

Enable Azure Diagnostic Logs Settings

Enable Azure Diagnostic Logs Settings

Logging to storage account $resource = Get-AzResource -Name [resource name] -ResourceGroupName [resource group name] $storage = Get-AzResource -Name [resource name] -ResourceGroupName [resource group name] Set-AzDiagnosticSetting –ResourceId $resource.ResourceId –StorageAccountId $storage.ResourceId -Enabled $true Streaming of diagnostic logs to Event Hub $rule = Get-AzServiceBusRule -ResourceGroup [resource group name] -Namespace [namespace] -Topic [topic] -Subscription [subscription] -Name [rule name] Set-AzureRmDiagnosticSetting -ResourceId $resource.ResourceId -ServiceBusRuleId $rule.Id -Enabled $true Streaming of diagnostic logs to a Log Analytics workspace $workspace = Get-AzOperationalInsightsWorkspace -Name [workspace name]-ResourceGroupName [resource group name] Set-AzureRmDiagnosticSetting…

Read More Read More