Skip to content

Issues with Accessing VM after terraform deployment #28

@Nate-09

Description

@Nate-09

Hi Everyone,

I've come across issues accessing the vm when running the latest terraform and azure-cli.

When I run this the entire deployment succeeds in Azure however once the deployment is completed and I attempt to login to the VM I'm unable to do so using any client.

I receive a permission denied (public key) or I receive a prompt for a passphrase for the key which I haven't provided one.

The following commands have not worked in my case to gain access to the VM.

rm -f ~/.ssh/azureuser
cat terraform.tfstate | jq '.outputs.tls_private_key.value' | sed 's/"//g' | awk '{ gsub(/\\\\n/,"\\n") }1' > ~/.ssh/azureuser
chmod 400 ~/.ssh/azureuser
ssh -i ~/.ssh/azureuser azureuser@$(az vm show --resource-group opencti_rg --name opencti -d --query [publicIps] -o tsv)

I have left the defaults in this example however I have made the necessary changes to the user, resource group and host name.

Any help would be much appreciated

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions