You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When provisioning a new instance, it will sometimes (usually, but not always) fail with a "file provisioner error" with SSH authentication failed
This was after it had been successfully deployed and I was trying to change the configuration. Usually when it occurs during creation I can log in as root with the generated .pem file, but the nixos configuration has not been applied.
I thought maybe it was a problem with the particular AMI I was using, but I have experienced the problem with 20.09, 21.05, and 21.11.
The text was updated successfully, but these errors were encountered:
I experienced this error after deploying OpenSSH 8.8 to a remote instance. It turned out that OpenSSH 8.8 disabled the ssh-rsa key algorithm for security reasons and the terraform provisioner is not working with the newer sha2 algorithms yet (hashicorp/terraform#30134).
As a workaround you can add the following to your system configuration:
This will soon have a better(?) solution, with hashicorp/terraform-provider-tls#150 hopefully coming out soon, where you could then just switch your keys to ed25519 instead of rsa to avoid this issue altogether.
I'm not sure if this is related, I have been trying to deploy using Gitlab CI and I get the error on the same line, but the last error is an i/o timeout, not an SSH authentication error:
Describe the bug
When provisioning a new instance, it will sometimes (usually, but not always) fail with a "file provisioner error" with SSH authentication failed
To Reproduce
terraform init
andterraform apply
with the following configuration (main.tf is placed interraform/main.tf
, and .nix files are innixos/configuration.nix
andnixos/git-server.nix
: https://gist.github.com/spearman/58db5a31afd88c8962d9a5b3da78ac00Expected behavior
I would expect it to be reproducible and not fail randomly.
Environment
Additional context
Here is the full output when running terraform apply:
https://gist.github.com/spearman/5f19ffb4c80791f0444c4a2a3b88afab
This was after it had been successfully deployed and I was trying to change the configuration. Usually when it occurs during creation I can log in as root with the generated .pem file, but the nixos configuration has not been applied.
I thought maybe it was a problem with the particular AMI I was using, but I have experienced the problem with 20.09, 21.05, and 21.11.
The text was updated successfully, but these errors were encountered: