title: Azure can not access VM
body: <p>I have created a VM via terraform but I can not access it from <a href="https://shell.azure.com/" rel="nofollow noreferrer">https://shell.azure.com/</a></p>
  
  <p>When I type:</p>
  
  <pre><code>ssh azureuser@40.IP.IP.IP
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>Permission denied (publickey).
  </code></pre>
  
  <p>From terraform script I know that this VM was created with:</p>
  
  <pre><code>os_profile {
      computer_name  = "myvm"
      admin_username = "azureuser"
  }
  
  os_profile_linux_config {
      disable_password_authentication = true
      ssh_keys {
          path     = "/home/azureuser/.ssh/authorized_keys"
          key_data = "ssh-rsa AAAAB3Nz(...)"
      }
  }
  output "public_ip_address" {
      value = azurerm_public_ip.myterraformpublicip.ip_address
  }
  </code></pre>
  
  <p>How can I access my VM? I know it's IP, admin user but can not access it.</p>
  
  <p>On Azure in <code>/home/user/.ssh</code> I got a public key and a private key.</p>