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

Terraform remote-exec-provisioner is failing in Fips mode on RockyLinux 8 #34710

Closed
infa-sapatil opened this issue Feb 21, 2024 · 3 comments
Closed
Labels
enhancement provisioners upstream waiting-response An issue/pull request is waiting for a response from the community

Comments

@infa-sapatil
Copy link

infa-sapatil commented Feb 21, 2024

Terraform Version

11.1.3

Terraform Configuration Files

...terraform config...

Debug Output

module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Provisioning with 'local-exec'...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (local-exec): Executing: ["/bin/sh" "-c" "ssh-keygen -R 10.85.3.204 > /dev/null 2>&1 || true"]
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Provisioning with 'remote-exec'...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:27:27.626-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:27 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (10s elapsed)
2024-02-20T03:27:42.626-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:42 [ERROR] connection error: dial tcp 10.85.3.204:22: i/o timeout
2024-02-20T03:27:42.626-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:42 [WARN] retryable error: dial tcp 10.85.3.204:22: i/o timeout
2024-02-20T03:27:42.626-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:42 [INFO] sleeping for 1s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:27:43.626-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:43 [DEBUG] connecting to TCP connection for SSH
2024-02-20T03:27:43.631-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:43 [ERROR] connection error: dial tcp 10.85.3.204:22: connect: connection refused
2024-02-20T03:27:43.631-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:43 [WARN] retryable error: dial tcp 10.85.3.204:22: connect: connection refused
2024-02-20T03:27:43.631-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:43 [INFO] sleeping for 2s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:27:45.632-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:45 [DEBUG] connecting to TCP connection for SSH
2024-02-20T03:27:45.635-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:45 [ERROR] connection error: dial tcp 10.85.3.204:22: connect: connection refused
2024-02-20T03:27:45.635-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:45 [WARN] retryable error: dial tcp 10.85.3.204:22: connect: connection refused
2024-02-20T03:27:45.635-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:45 [INFO] sleeping for 4s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (20s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:27:49.635-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:49 [DEBUG] connecting to TCP connection for SSH
2024-02-20T03:27:50.640-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:50 [ERROR] connection error: dial tcp 10.85.3.204:22: connect: connection refused
2024-02-20T03:27:50.640-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:50 [WARN] retryable error: dial tcp 10.85.3.204:22: connect: connection refused
2024-02-20T03:27:50.640-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:50 [INFO] sleeping for 8s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (30s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
2024-02-20T03:27:58.643-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:58 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:27:58.647-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:58 [DEBUG] handshaking with SSH
2024-02-20T03:27:59.458-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:59 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [publickey none], no supported methods remain
2024-02-20T03:27:59.458-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:59 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [publickey none], no supported methods remain
2024-02-20T03:27:59.458-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:27:59 [INFO] sleeping for 16s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (40s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
2024-02-20T03:28:15.459-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:15 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:28:15.462-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:15 [DEBUG] handshaking with SSH
2024-02-20T03:28:15.673-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:15 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:28:15.673-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:15 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:28:15.673-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:15 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (50s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (1m0s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
2024-02-20T03:28:35.673-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:35 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:28:35.676-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:35 [DEBUG] handshaking with SSH
2024-02-20T03:28:35.843-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:35 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:28:35.843-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:35 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:28:35.843-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:35 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (1m10s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (1m20s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
2024-02-20T03:28:55.843-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:55 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:28:55.846-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:55 [DEBUG] handshaking with SSH
2024-02-20T03:28:56.322-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:56 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:28:56.322-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:56 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:28:56.322-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:28:56 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (1m30s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (1m40s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:29:16.323-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:16 [DEBUG] connecting to TCP connection for SSH
2024-02-20T03:29:16.325-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:16 [DEBUG] handshaking with SSH
2024-02-20T03:29:16.475-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:16 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:29:16.475-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:16 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:29:16.475-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:16 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (1m50s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (2m0s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:29:36.476-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:36 [DEBUG] connecting to TCP connection for SSH
2024-02-20T03:29:36.479-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:36 [DEBUG] handshaking with SSH
2024-02-20T03:29:36.716-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:36 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:29:36.716-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:36 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:29:36.716-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:36 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (2m10s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (2m20s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
2024-02-20T03:29:56.718-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:56 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:29:56.721-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:56 [DEBUG] handshaking with SSH
2024-02-20T03:29:56.878-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:56 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:29:56.878-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:56 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:29:56.878-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:29:56 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (2m30s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (2m40s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
2024-02-20T03:30:16.878-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:16 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:30:16.880-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:16 [DEBUG] handshaking with SSH
2024-02-20T03:30:17.051-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:17 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:30:17.051-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:17 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:30:17.052-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:17 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (2m50s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (3m0s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:30:37.054-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:37 [DEBUG] connecting to TCP connection for SSH
2024-02-20T03:30:37.056-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:37 [DEBUG] handshaking with SSH
2024-02-20T03:30:37.199-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:37 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:30:37.199-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:37 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:30:37.199-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:37 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (3m10s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (3m20s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:30:57.201-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:57 [DEBUG] connecting to TCP connection for SSH
2024-02-20T03:30:57.204-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:57 [DEBUG] handshaking with SSH
2024-02-20T03:30:57.387-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:57 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:30:57.387-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:57 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:30:57.387-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:30:57 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (3m30s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (3m40s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:31:17.389-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:17 [DEBUG] connecting to TCP connection for SSH
2024-02-20T03:31:17.392-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:17 [DEBUG] handshaking with SSH
2024-02-20T03:31:17.511-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:17 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:31:17.511-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:17 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:31:17.511-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:17 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (3m50s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (4m0s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
2024-02-20T03:31:37.512-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:37 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:31:37.515-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:37 [DEBUG] handshaking with SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (4m10s elapsed)
2024-02-20T03:31:37.632-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:37 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:31:37.632-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:37 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:31:37.632-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:37 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (4m20s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (4m30s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
2024-02-20T03:31:57.632-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:57 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:31:57.635-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:57 [DEBUG] handshaking with SSH
2024-02-20T03:31:57.753-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:57 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:31:57.753-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:57 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:31:57.753-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:31:57 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (4m40s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (4m50s elapsed)
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec): Connecting to remote host via SSH...
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Host: 10.85.3.204
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   User: cloud-user
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Password: false
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Private key: true
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   SSH Agent: false
2024-02-20T03:32:17.754-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:32:17 [DEBUG] connecting to TCP connection for SSH
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance (remote-exec):   Checking Host Key: false
2024-02-20T03:32:17.758-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:32:17 [DEBUG] handshaking with SSH
2024-02-20T03:32:17.903-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:32:17 [WARN] ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:32:17.903-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:32:17 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024-02-20T03:32:17.903-0500 [DEBUG] plugin.terraform-11.13: remote-exec-provisioner (internal) 2024/02/20 03:32:17 [INFO] sleeping for 20s
module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: Still creating... (5m0s elapsed)
2024/02/20 03:32:27 [ERROR] root.create-ec2-icai-haproxy: eval: *terraform.EvalApplyProvisioners, err: timeout - last error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024/02/20 03:32:27 [ERROR] root.create-ec2-icai-haproxy: eval: *terraform.EvalSequence, err: timeout - last error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
2024/02/20 03:32:27 [TRACE] [walkApply] Exiting eval tree: module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance

Error: Error applying plan:

1 error(s) occurred:

* module.create-ec2-icai-haproxy.null_resource.attaching_ebs_instance: timeout - last error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.

Expected Behavior

remote-exec-provisioner should work

Actual Behavior

remote-exec-provisioner is not working using rsa pem key type

remote-exec-provisioner (internal) 2024/02/20 03:32:17 [WARN] retryable error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain
err: timeout - last error: ssh: handshake failed: ssh: unable to authenticate, attempted methods [none publickey], no supported methods remain

Steps to Reproduce

terraform apply

Additional Context

Since Fips only supports rsa and ecdsa . We have tried both and both the key types are failing for terraform

Note: Manually We are able to ssh to newly created instance by terraform via rsa pem

References

No response

@infa-sapatil infa-sapatil added bug new new issue not yet triaged labels Feb 21, 2024
@kmoe
Copy link
Member

kmoe commented Feb 23, 2024

Thanks for the issue report.

The Terraform version stated (11.1.3) is not a valid Terraform version. If you mean version 0.11.13, please note that we are no longer issuing patch releases for any minor version below 1.7.

As far as I can tell, the remote-exec provisioner has never explicitly been designed to support FIPS, although it looks like it did work in a 1.2 release: #30134
I recommend upgrading to at least v1.2.9, which may fix the issue.

For completeness, please also post your Terraform config (particularly the provisioner config) and your SSH config.


If the latest version of Terraform isn't working with FIPS, we may need to add an additional option to the provisioner to enable FIPS mode, which would tell Terraform to use a specific SSH configuration with the correct ciphers, pub key types, and MACs.

This will be a lot easier when the upstream Go stdlib proposal for a fipsonly mode is implemented: golang/go#64769. Otherwise Terraform would need to hard-code the list of supported ciphers, etc.

@kmoe kmoe added waiting-response An issue/pull request is waiting for a response from the community provisioners enhancement upstream and removed new new issue not yet triaged bug labels Feb 23, 2024
@jbardin
Copy link
Member

jbardin commented Mar 7, 2024

Yes, the update to the crypto/ssh library was merged in #30962, which was released in version v1.2. The only way to update the ssh client code is to use a more recent version of Terraform. The proposed fipsonly would be more relevant for servers, the ssh client used by Terraform is capable of handling handshakes negotiation from compliant servers.

@jbardin jbardin closed this as completed Mar 7, 2024
Copy link
Contributor

github-actions bot commented Apr 7, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement provisioners upstream waiting-response An issue/pull request is waiting for a response from the community
Projects
None yet
Development

No branches or pull requests

3 participants