【问题标题】:WinRM self signed cert for azure VM适用于 azure VM 的 WinRM 自签名证书
【发布时间】:2021-12-23 11:52:05
【问题描述】:

寻找有关如何使用 Azure.Security.KeyVault.Certificates 库生成自签名证书或生成独立证书并将其导入 azure keyvault 的示例。我的意图是使用此证书通过 winrm 连接到 azure VM。

【问题讨论】:

    标签: azure certificate azure-keyvault winrm


    【解决方案1】:

    您可以按照以下步骤创建证书

    // Create a certificate. This starts a long running operation to create and sign the certificate.
    CertificateOperation operation = client.StartCreateCertificate("MyCertificate", CertificatePolicy.Default);
    
    // You can await the completion of the create certificate operation.
    // You should run UpdateStatus in another thread or do other work like pumping messages between calls.
    while (!operation.HasCompleted)
    {
        Thread.Sleep(2000);
    
        operation.UpdateStatus();
    }
    
    KeyVaultCertificateWithPolicy certificate = operation.Value;

    请参考这里找到一些例子。 https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/keyvault/Azure.Security.KeyVault.Certificates/samples

    Azure 虚拟机中使用 HTTPS 配置 WinRM 的参考

    https://techdiksha.com/configuring-winrm-azure-virtual-machine/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-10-03
      • 2012-07-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多