Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with Accessing VM after terraform deployment #28

Open
Nate-09 opened this issue Mar 18, 2022 · 0 comments
Open

Issues with Accessing VM after terraform deployment #28

Nate-09 opened this issue Mar 18, 2022 · 0 comments

Comments

@Nate-09
Copy link

Nate-09 commented Mar 18, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant